diff --git a/go.mod b/go.mod index 2dce225..6a54d1b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/vmware-tanzu-labs/operator-builder -go 1.18 +go 1.17 require ( github.com/go-playground/validator v9.31.0+incompatible diff --git a/internal/plugins/workload/v1/scaffolds/templates/gomod.go b/internal/plugins/workload/v1/scaffolds/templates/gomod.go index 898878e..9d6bfbc 100644 --- a/internal/plugins/workload/v1/scaffolds/templates/gomod.go +++ b/internal/plugins/workload/v1/scaffolds/templates/gomod.go @@ -10,7 +10,7 @@ import ( var _ machinery.Template = &GoMod{} const ( - GoVersion = "1.18" + GoVersionMinimum = "1.17" ) // GoMod scaffolds a file that defines the project dependencies. @@ -18,8 +18,8 @@ type GoMod struct { machinery.TemplateMixin machinery.RepositoryMixin - GoVersion string - Dependencies map[string]string + GoVersionMinimum string + Dependencies map[string]string } // goModDependencyMap pins the versions within the go.mod file so that they @@ -50,7 +50,7 @@ func (f *GoMod) SetTemplateDefaults() error { f.Path = "go.mod" } - f.GoVersion = GoVersion + f.GoVersionMinimum = GoVersionMinimum f.Dependencies = goModDependencyMap() f.TemplateBody = goModTemplate f.IfExistsAction = machinery.OverwriteFile