Skip to content

Commit

Permalink
Merge pull request #58 from seipan/fix/remove-deplicate-pkg
Browse files Browse the repository at this point in the history
ioutilからosに置き換える
  • Loading branch information
takanakahiko authored Nov 22, 2023
2 parents 2d633ef + 03c163c commit 8276e8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"go/parser"
"go/token"
"io"
"io/ioutil"
"os"
"path/filepath"
"regexp"
Expand All @@ -33,7 +32,7 @@ func (g *Generator) Generate() error {
tfuncs := filterTestFuncs(g.TestFuncs)
for v, t := range tfuncs {
filename := fmt.Sprintf("%s_%s.go", v, base)
tf, err := ioutil.TempFile(g.OutputDir, filename)
tf, err := os.CreateTemp(g.OutputDir, filename)
if err != nil {
return errors.WithStack(err)
}
Expand Down
3 changes: 1 addition & 2 deletions lib/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package atgen

import (
"go/types"
"io/ioutil"
"os"
"path/filepath"
"strings"
Expand All @@ -17,7 +16,7 @@ import (
// ParseYaml parses yaml which defines test requests/responses
// and convert it to types defined in types.go
func (g *Generator) ParseYaml() error {
buf, err := ioutil.ReadFile(g.Yaml)
buf, err := os.ReadFile(g.Yaml)
if err != nil {
return errors.WithStack(err)
}
Expand Down

0 comments on commit 8276e8a

Please sign in to comment.