@@ -2,7 +2,6 @@ package main
2
2
3
3
import (
4
4
"fmt"
5
- "io/ioutil"
6
5
"log"
7
6
"os"
8
7
"path/filepath"
@@ -101,7 +100,7 @@ func hasStr(slice []string, s string) bool {
101
100
}
102
101
103
102
func loadConfig (file string ) Config {
104
- data , err := ioutil .ReadFile (file )
103
+ data , err := os .ReadFile (file )
105
104
if err != nil {
106
105
log .Fatalln (err )
107
106
}
@@ -177,7 +176,7 @@ func writeJsonnet(to, data string) error {
177
176
return fmt .Errorf ("%s: %s" , err , data )
178
177
}
179
178
180
- return ioutil .WriteFile (to , []byte (s ), 0644 )
179
+ return os .WriteFile (to , []byte (s ), 0644 )
181
180
}
182
181
183
182
func copyDirLibsonnet (dir , to string ) ([]string , error ) {
@@ -199,14 +198,14 @@ func copyDirLibsonnet(dir, to string) ([]string, error) {
199
198
})
200
199
201
200
for _ , a := range adds {
202
- content , err := ioutil .ReadFile (a )
201
+ content , err := os .ReadFile (a )
203
202
if err != nil {
204
203
return nil , err
205
204
}
206
205
207
206
a = filepath .Join (to , filepath .Base (a ))
208
207
os .MkdirAll (filepath .Dir (a ), os .ModePerm )
209
- if err := ioutil .WriteFile (a , content , 0644 ); err != nil {
208
+ if err := os .WriteFile (a , content , 0644 ); err != nil {
210
209
return nil , err
211
210
}
212
211
}
0 commit comments