Skip to content

Commit

Permalink
Merge branch 'master' into toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetTechuila authored Nov 29, 2023
2 parents 4ff5ebf + c61e4e3 commit 4a6358b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ go 1.21
require (
github.com/go-ini/ini v1.67.0
github.com/mattn/go-colorable v0.1.13
golang.org/x/net v0.18.0
golang.org/x/net v0.19.0
)

require (
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/stretchr/testify v1.7.1 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/sys v0.15.0 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
3 changes: 1 addition & 2 deletions src/utils/path-utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package utils

import (
"errors"
"io/ioutil"
"os"
"path/filepath"
"runtime"
Expand Down Expand Up @@ -79,7 +78,7 @@ var userAppsFolder = GetUserFolder("CustomApps")
var userExtensionsFolder = GetUserFolder("Extensions")

func GetCustomAppSubfolderPath(folderPath string) string {
entries, err := ioutil.ReadDir(folderPath)
entries, err := os.ReadDir(folderPath)
if err != nil {
return ""
}
Expand Down
7 changes: 3 additions & 4 deletions src/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
Expand Down Expand Up @@ -83,7 +82,7 @@ func Unzip(src, dest string) error {

// Copy .
func Copy(src, dest string, recursive bool, filters []string) error {
dir, err := ioutil.ReadDir(src)
dir, err := os.ReadDir(src)
if err != nil {
return err
}
Expand Down Expand Up @@ -182,15 +181,15 @@ func ReplaceOnce(input *string, regexpTerm string, replaceTerm string) {
// ModifyFile opens file, changes file content by executing
// `repl` callback function and writes new content.
func ModifyFile(path string, repl func(string) string) {
raw, err := ioutil.ReadFile(path)
raw, err := os.ReadFile(path)
if err != nil {
log.Print(err)
return
}

content := repl(string(raw))

ioutil.WriteFile(path, []byte(content), 0700)
os.WriteFile(path, []byte(content), 0700)
}

// GetSpotifyVersion .
Expand Down
4 changes: 2 additions & 2 deletions src/utils/vcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package utils
import (
"encoding/json"
"errors"
"io/ioutil"
"io"
"net/http"
)

Expand All @@ -18,7 +18,7 @@ func FetchLatestTag() (string, error) {
return "", err
}

body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
return "", err
}
Expand Down

0 comments on commit 4a6358b

Please sign in to comment.