File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ import (
23
23
"bytes"
24
24
"encoding/json"
25
25
"fmt"
26
- "io/ioutil"
27
26
"os"
28
27
"path/filepath"
29
28
"sort"
@@ -200,7 +199,7 @@ func (s *PHPStore) loadVersions() {
200
199
// disk cache?
201
200
cache := filepath .Join (s .configDir , "php_versions.json" )
202
201
if _ , err := os .Stat (cache ); err == nil {
203
- if contents , err := ioutil .ReadFile (cache ); err == nil {
202
+ if contents , err := os .ReadFile (cache ); err == nil {
204
203
var vs versions
205
204
if err := json .Unmarshal (contents , & vs ); err == nil {
206
205
for _ , v := range vs {
@@ -222,7 +221,7 @@ func (s *PHPStore) loadVersions() {
222
221
s .discover ()
223
222
sort .Sort (s .versions )
224
223
if contents , err := json .MarshalIndent (s .versions , "" , " " ); err == nil {
225
- _ = ioutil .WriteFile (cache , contents , 0644 )
224
+ _ = os .WriteFile (cache , contents , 0644 )
226
225
}
227
226
}
228
227
@@ -282,7 +281,7 @@ func (s *PHPStore) readVersion(file string) []byte {
282
281
if _ , err := os .Stat (file ); err != nil {
283
282
return nil
284
283
}
285
- contents , err := ioutil .ReadFile (file )
284
+ contents , err := os .ReadFile (file )
286
285
if err != nil {
287
286
return nil
288
287
}
You can’t perform that action at this time.
0 commit comments