Skip to content

Commit

Permalink
bump golang ver => 1.22.5
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiuszos4chain committed Aug 21, 2024
1 parent 0bf2e8a commit 69d0954
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
9 changes: 6 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
module github.com/matryer/moq

go 1.18
go 1.22.5

require (
github.com/pmezard/go-difflib v1.0.0
golang.org/x/tools v0.17.0
golang.org/x/tools v0.24.0
)

require golang.org/x/mod v0.14.0 // indirect
require (
golang.org/x/mod v0.20.0 // indirect
golang.org/x/sync v0.8.0 // indirect
)
11 changes: 6 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"

Expand Down Expand Up @@ -109,5 +108,5 @@ func run(flags userFlags) error {
return err
}

return ioutil.WriteFile(flags.outFile, buf.Bytes(), 0o600)
return os.WriteFile(flags.outFile, buf.Bytes(), 0o600)
}
7 changes: 3 additions & 4 deletions pkg/moq/moq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
Expand Down Expand Up @@ -464,14 +463,14 @@ func matchGoldenFile(goldenFile string, actual []byte) error {
if err := os.MkdirAll(filepath.Dir(goldenFile), 0o750); err != nil {
return fmt.Errorf("create dir: %s", err)
}
if err := ioutil.WriteFile(goldenFile, actual, 0o600); err != nil {
if err := os.WriteFile(goldenFile, actual, 0o600); err != nil {
return fmt.Errorf("write: %s", err)
}

return nil
}

expected, err := ioutil.ReadFile(goldenFile)
expected, err := os.ReadFile(goldenFile)
if err != nil {
return fmt.Errorf("read: %s: %s", goldenFile, err)
}
Expand Down Expand Up @@ -694,7 +693,7 @@ func TestMockError(t *testing.T) {
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
err := m.Mock(ioutil.Discard, tc.namePair)
err := m.Mock(io.Discard, tc.namePair)
if err == nil {
t.Errorf("expected error but got nil")
return
Expand Down
2 changes: 1 addition & 1 deletion pkg/moq/testpackages/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/matryer/moq/pkg/moq/testpackages

go 1.18
go 1.22.5

require github.com/sudo-suhas/moq-test-pkgs/somerepo v0.0.0-20200816045313-d2f573eea6c7

0 comments on commit 69d0954

Please sign in to comment.