From f7293029b65bdfd3c4ee95644dc4860614bc35c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Luka=C5=A1=C3=ADk?= Date: Mon, 11 Mar 2024 17:19:30 +0100 Subject: [PATCH 1/4] bump minimal go version to 1.19 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index bbcaf30..e896791 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/gocomply/metaschema -go 1.18 +go 1.19 require ( github.com/iancoleman/strcase v0.3.0 From 8675fa2444871d5a095b1a707529424c414c1800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Luka=C5=A1=C3=ADk?= Date: Mon, 11 Mar 2024 17:37:22 +0100 Subject: [PATCH 2/4] do not use deprecated io/ioutils --- metaschema/generate.go | 3 +-- metaschema/templates/template.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) 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 } From 661562742d465306c48d982de87d73b927916759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Luka=C5=A1=C3=ADk?= Date: Mon, 11 Mar 2024 17:24:46 +0100 Subject: [PATCH 3/4] bump minimal go version to 1.20 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e896791..056b6fc 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/gocomply/metaschema -go 1.19 +go 1.20 require ( github.com/iancoleman/strcase v0.3.0 From 8129b7b91dd3cf0829c9dc97aa502653ebeb7688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Luka=C5=A1=C3=ADk?= Date: Mon, 11 Mar 2024 17:25:17 +0100 Subject: [PATCH 4/4] bump minimal go version to 1.21 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 056b6fc..b03ef86 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/gocomply/metaschema -go 1.20 +go 1.21 require ( github.com/iancoleman/strcase v0.3.0