File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/symfony-cli/phpstore
33go 1.17
44
55require (
6- github.com/hashicorp/go-version v1.3 .0
6+ github.com/hashicorp/go-version v1.6 .0
77 github.com/mitchellh/go-homedir v1.1.0
88 github.com/pkg/errors v0.9.1
99 gopkg.in/yaml.v2 v2.4.0
Original file line number Diff line number Diff line change 1- github.com/hashicorp/go-version v1.3 .0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw =
2- github.com/hashicorp/go-version v1.3 .0 /go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA =
1+ github.com/hashicorp/go-version v1.6 .0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek =
2+ github.com/hashicorp/go-version v1.6 .0 /go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA =
33github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y =
44github.com/mitchellh/go-homedir v1.1.0 /go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0 =
55github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4 =
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ import (
2323 "bytes"
2424 "encoding/json"
2525 "fmt"
26- "io/ioutil"
2726 "os"
2827 "path/filepath"
2928 "sort"
@@ -200,7 +199,7 @@ func (s *PHPStore) loadVersions() {
200199 // disk cache?
201200 cache := filepath .Join (s .configDir , "php_versions.json" )
202201 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 {
204203 var vs versions
205204 if err := json .Unmarshal (contents , & vs ); err == nil {
206205 for _ , v := range vs {
@@ -222,7 +221,7 @@ func (s *PHPStore) loadVersions() {
222221 s .discover ()
223222 sort .Sort (s .versions )
224223 if contents , err := json .MarshalIndent (s .versions , "" , " " ); err == nil {
225- _ = ioutil .WriteFile (cache , contents , 0644 )
224+ _ = os .WriteFile (cache , contents , 0644 )
226225 }
227226}
228227
@@ -282,7 +281,7 @@ func (s *PHPStore) readVersion(file string) []byte {
282281 if _ , err := os .Stat (file ); err != nil {
283282 return nil
284283 }
285- contents , err := ioutil .ReadFile (file )
284+ contents , err := os .ReadFile (file )
286285 if err != nil {
287286 return nil
288287 }
You can’t perform that action at this time.
0 commit comments