diff --git a/generator.go b/generator.go index 6f09bf59..1635ab0d 100644 --- a/generator.go +++ b/generator.go @@ -6,7 +6,6 @@ import ( "database/sql" "fmt" "io" - "io/ioutil" "log" "os" "path/filepath" @@ -567,7 +566,7 @@ func (g *Generator) output(fileName string, content []byte) error { } return fmt.Errorf("cannot format file: %w", err) } - return ioutil.WriteFile(fileName, result, 0640) + return os.WriteFile(fileName, result, 0640) } func (g *Generator) pushQueryStructMeta(meta *generate.QueryStructMeta) (*genInfo, error) {