-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use maintained go-bindata instead of an archived version #9107
Comments
See jteeuwen/go-bindata#5 for background (account went "missing") Most of the forking happened around what kevinburke calls 3.2-3.3
Hopefully it would make for a drop-in replacement for generated data. |
Need to look at the differences, seems to be mostly whitespace etc.
|
Comparing with the older version (and ignoring whitespace and blank lines) makes diff smaller. Looks OK. --- pkg/minikube/assets/assets.go.orig 2020-08-29 15:12:15.403044261 +0200
+++ pkg/minikube/assets/assets.go 2020-08-29 15:17:16.804595218 +0200
@@ -1,4 +1,4 @@
-// Code generated by go-bindata.
+// Code generated by go-bindata. DO NOT EDIT.
// sources:
// deploy/addons/ambassador/ambassador-operator-crds.yaml
// deploy/addons/ambassador/ambassador-operator.yaml
@@ -76,7 +76,6 @@
// deploy/addons/storage-provisioner-gluster/storage-gluster-ns.yaml.tmpl
// deploy/addons/storage-provisioner-gluster/storage-provisioner-glusterfile.yaml.tmpl
// deploy/addons/storageclass/storageclass.yaml.tmpl
-// DO NOT EDIT!
package assets
@@ -100,13 +99,14 @@
var buf bytes.Buffer
_, err = io.Copy(&buf, gz)
- clErr := gz.Close()
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
}
+
+ clErr := gz.Close()
if clErr != nil {
- return nil, err
+ return nil, clErr
}
return buf.Bytes(), nil
@@ -1667,8 +1667,8 @@
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- if f, ok := _bindata[cannonicalName]; ok {
+ canonicalName := strings.Replace(name, "\\", "/", -1)
+ if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
@@ -1693,8 +1693,8 @@
// It returns an error if the asset could not be found or
// could not be loaded.
func AssetInfo(name string) (os.FileInfo, error) {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- if f, ok := _bindata[cannonicalName]; ok {
+ canonicalName := strings.Replace(name, "\\", "/", -1)
+ if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
@@ -1809,8 +1884,8 @@
func AssetDir(name string) ([]string, error) {
node := _bintree
if len(name) != 0 {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- pathList := strings.Split(cannonicalName, "/")
+ canonicalName := strings.Replace(name, "\\", "/", -1)
+ pathList := strings.Split(canonicalName, "/")
for _, p := range pathList {
node = node.Children[p]
if node == nil {
@@ -1996,11 +2071,7 @@
if err != nil {
return err
}
- err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
- if err != nil {
- return err
- }
- return nil
+ return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
}
// RestoreAssets restores an asset under the given directory recursively
@@ -2021,6 +2092,6 @@
}
func _filePath(dir, name string) string {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
+ canonicalName := strings.Replace(name, "\\", "/", -1)
+ return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...)
}
--- pkg/minikube/translate/translations.go.orig 2020-08-29 15:12:15.479043643 +0200
+++ pkg/minikube/translate/translations.go 2020-08-29 15:17:16.916594307 +0200
@@ -1,4 +1,4 @@
-// Code generated by go-bindata.
+// Code generated by go-bindata. DO NOT EDIT.
// sources:
// translations/de.json
// translations/es.json
@@ -8,7 +8,6 @@
// translations/pl.json
// translations/strings.txt
// translations/zh-CN.json
-// DO NOT EDIT!
package translate
@@ -32,13 +31,14 @@
var buf bytes.Buffer
_, err = io.Copy(&buf, gz)
- clErr := gz.Close()
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
}
+
+ clErr := gz.Close()
if clErr != nil {
- return nil, err
+ return nil, clErr
}
return buf.Bytes(), nil
@@ -239,8 +239,8 @@
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- if f, ok := _bindata[cannonicalName]; ok {
+ canonicalName := strings.Replace(name, "\\", "/", -1)
+ if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
@@ -265,8 +265,8 @@
// It returns an error if the asset could not be found or
// could not be loaded.
func AssetInfo(name string) (os.FileInfo, error) {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- if f, ok := _bindata[cannonicalName]; ok {
+ canonicalName := strings.Replace(name, "\\", "/", -1)
+ if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
@@ -313,8 +320,8 @@
func AssetDir(name string) ([]string, error) {
node := _bintree
if len(name) != 0 {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- pathList := strings.Split(cannonicalName, "/")
+ canonicalName := strings.Replace(name, "\\", "/", -1)
+ pathList := strings.Split(canonicalName, "/")
for _, p := range pathList {
node = node.Children[p]
if node == nil {
@@ -368,11 +375,7 @@
if err != nil {
return err
}
- err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
- if err != nil {
- return err
- }
- return nil
+ return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
}
// RestoreAssets restores an asset under the given directory recursively
@@ -393,6 +396,6 @@
}
func _filePath(dir, name string) string {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
+ canonicalName := strings.Replace(name, "\\", "/", -1)
+ return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...)
} |
There is also a https://github.com/go-bindata/go-bindata organization, that has an older fork... They call their releases "3.1", which I suppose was why the numbering started over with "3.2".
|
I think we will end up going with
|
Currently the Makefile uses an outdated and archived version of go-bindata:
minikube/Makefile
Line 311 in 214ff5b
Someone else has volunteered to maintain this package, see influxdata/chronograf#2785 and here.
The text was updated successfully, but these errors were encountered: