@@ -11,7 +11,7 @@ import (
1111func bindata_read (data []byte , name string ) ([]byte , error ) {
1212 gz , err := gzip .NewReader (bytes .NewBuffer (data ))
1313 if err != nil {
14- return nil , fmt .Errorf ("Read %q: %v " , name , err )
14+ return nil , fmt .Errorf ("Read %q: %w " , name , err )
1515 }
1616
1717 var buf bytes.Buffer
@@ -21,7 +21,7 @@ func bindata_read(data []byte, name string) ([]byte, error) {
2121 }
2222
2323 if err != nil {
24- return nil , fmt .Errorf ("Read %q: %v " , name , err )
24+ return nil , fmt .Errorf ("Read %q: %w " , name , err )
2525 }
2626
2727 return buf .Bytes (), nil
@@ -68,7 +68,7 @@ func test_migrations_2_record_sql() ([]byte, error) {
6868// It returns an error if the asset could not be found or
6969// could not be loaded.
7070func Asset (name string ) ([]byte , error ) {
71- canonicalName := strings .Replace (name , "\\ " , "/" , - 1 )
71+ canonicalName := strings .ReplaceAll (name , "\\ " , "/" )
7272 if f , ok := _bindata [canonicalName ]; ok {
7373 return f ()
7474 }
@@ -94,19 +94,21 @@ var _bindata = map[string]func() ([]byte, error){
9494// directory embedded in the file by go-bindata.
9595// For example if you run go-bindata on data/... and data contains the
9696// following hierarchy:
97- // data/
98- // foo.txt
99- // img/
100- // a.png
101- // b.png
97+ //
98+ // data/
99+ // foo.txt
100+ // img/
101+ // a.png
102+ // b.png
103+ //
102104// then AssetDir("data") would return []string{"foo.txt", "img"}
103105// AssetDir("data/img") would return []string{"a.png", "b.png"}
104106// AssetDir("foo.txt") and AssetDir("notexist") would return an error
105107// AssetDir("") will return []string{"data"}.
106108func AssetDir (name string ) ([]string , error ) {
107109 node := _bintree
108110 if len (name ) != 0 {
109- canonicalName := strings .Replace (name , "\\ " , "/" , - 1 )
111+ canonicalName := strings .ReplaceAll (name , "\\ " , "/" )
110112 pathList := strings .Split (canonicalName , "/" )
111113 for _ , p := range pathList {
112114 node = node .Children [p ]
@@ -131,8 +133,8 @@ type _bintree_t struct {
131133}
132134
133135var _bintree = & _bintree_t {nil , map [string ]* _bintree_t {
134- "test-migrations" : & _bintree_t {nil , map [string ]* _bintree_t {
135- "1_initial.sql" : & _bintree_t {test_migrations_1_initial_sql , map [string ]* _bintree_t {}},
136- "2_record.sql" : & _bintree_t {test_migrations_2_record_sql , map [string ]* _bintree_t {}},
136+ "test-migrations" : {nil , map [string ]* _bintree_t {
137+ "1_initial.sql" : {test_migrations_1_initial_sql , map [string ]* _bintree_t {}},
138+ "2_record.sql" : {test_migrations_2_record_sql , map [string ]* _bintree_t {}},
137139 }},
138140}}
0 commit comments