diff --git a/go.mod b/go.mod index bbcaf30..b03ef86 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/gocomply/metaschema -go 1.18 +go 1.21 require ( github.com/iancoleman/strcase v0.3.0 diff --git a/metaschema/generate.go b/metaschema/generate.go index e334410..d88fac7 100644 --- a/metaschema/generate.go +++ b/metaschema/generate.go @@ -4,7 +4,6 @@ import ( "encoding/xml" "fmt" "io" - "io/ioutil" "os" "strings" @@ -13,7 +12,7 @@ import ( ) func Generate(metaschemaDir, goModule, outputDir string) error { - files, err := ioutil.ReadDir(metaschemaDir) + files, err := os.ReadDir(metaschemaDir) if err != nil { return err } diff --git a/metaschema/templates/template.go b/metaschema/templates/template.go index 9484332..bed22bf 100644 --- a/metaschema/templates/template.go +++ b/metaschema/templates/template.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" "go/format" - "io/ioutil" + "io" "os" "path/filepath" "strings" @@ -81,7 +81,7 @@ func newTemplate(baseDir, templateName string) (*template.Template, error) { } defer in.Close() - tempText, err := ioutil.ReadAll(in) + tempText, err := io.ReadAll(in) if err != nil { return nil, err }