From b79b2810bc8d3ed0d4e27c8246fbeb821461d3fd Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Sun, 10 Nov 2024 17:22:04 +0100 Subject: [PATCH] update github.com/kevinburke/go-bindata to v4.0.2 --- assets/assets.go | 15 ++++++++------- go.mod | 2 +- go.sum | 4 ++-- main.go | 2 +- tools.go | 9 --------- tools/tools.go | 1 + 6 files changed, 13 insertions(+), 20 deletions(-) delete mode 100644 tools.go diff --git a/assets/assets.go b/assets/assets.go index 3ee5db2..0fe535d 100644 --- a/assets/assets.go +++ b/assets/assets.go @@ -10,7 +10,6 @@ import ( "crypto/sha256" "fmt" "io" - "io/ioutil" "os" "path/filepath" "strings" @@ -190,11 +189,13 @@ const AssetDebug = false // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the // following hierarchy: -// data/ -// foo.txt -// img/ -// a.png -// b.png +// +// data/ +// foo.txt +// img/ +// a.png +// b.png +// // then AssetDir("data") would return []string{"foo.txt", "img"}, // AssetDir("data/img") would return []string{"a.png", "b.png"}, // AssetDir("foo.txt") and AssetDir("notexist") would return an error, and @@ -244,7 +245,7 @@ func RestoreAsset(dir, name string) error { if err != nil { return err } - err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) + err = os.WriteFile(_filePath(dir, name), data, info.Mode()) if err != nil { return err } diff --git a/go.mod b/go.mod index 2bff3f5..e8dfa16 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/portapps/whatsapp-portable go 1.23 require ( - github.com/kevinburke/go-bindata v3.24.0+incompatible + github.com/kevinburke/go-bindata/v4 v4.0.2 github.com/portapps/portapps/v3 v3.14.1 ) diff --git a/go.sum b/go.sum index a592359..7442ab0 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,8 @@ github.com/ilya1st/rotatewriter v0.0.0-20171126183947-3df0c1a3ed6d h1:OGuVAVny/9 github.com/ilya1st/rotatewriter v0.0.0-20171126183947-3df0c1a3ed6d/go.mod h1:S1q6q+21PRGd0WRX+fHjQ+TOe3CgpSv7zgCWnZcbxCs= github.com/josephspurrier/goversioninfo v1.4.1 h1:5LvrkP+n0tg91J9yTkoVnt/QgNnrI1t4uSsWjIonrqY= github.com/josephspurrier/goversioninfo v1.4.1/go.mod h1:JWzv5rKQr+MmW+LvM412ToT/IkYDZjaclF2pKDss8IY= -github.com/kevinburke/go-bindata v3.24.0+incompatible h1:qajFA3D0pH94OTLU4zcCCKCDgR+Zr2cZK/RPJHDdFoY= -github.com/kevinburke/go-bindata v3.24.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= +github.com/kevinburke/go-bindata/v4 v4.0.2 h1:6qQI0nNTL27wM1En8zQHGBEPp3ETzgFU6hVdSjlkrfE= +github.com/kevinburke/go-bindata/v4 v4.0.2/go.mod h1:M/CkBqw2qCZ1Ztv5JyKgocGYWyUkYlDqkqXS1ktLe5c= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= diff --git a/main.go b/main.go index 4f3a68e..ac58104 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,4 @@ -//go:generate go install -v github.com/kevinburke/go-bindata/go-bindata +//go:generate go install -v github.com/kevinburke/go-bindata/v4/go-bindata //go:generate go-bindata -prefix res/ -pkg assets -o assets/assets.go res/WhatsApp.lnk //go:generate go install -v github.com/josephspurrier/goversioninfo/cmd/goversioninfo //go:generate goversioninfo -icon=res/papp.ico -manifest=res/papp.manifest diff --git a/tools.go b/tools.go deleted file mode 100644 index f3afa98..0000000 --- a/tools.go +++ /dev/null @@ -1,9 +0,0 @@ -//go:build tools -// +build tools - -package tools - -import ( - // Import go-bindata tool - _ "github.com/kevinburke/go-bindata" -) diff --git a/tools/tools.go b/tools/tools.go index 85445be..deffc64 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -6,5 +6,6 @@ package tools import ( + _ "github.com/kevinburke/go-bindata/v4" _ "github.com/portapps/portapps/v3/tools" )