diff --git a/codegen/smithy-go-codegen-test/smithy-build.json b/codegen/smithy-go-codegen-test/smithy-build.json index 98ca0963..a2e1635b 100644 --- a/codegen/smithy-go-codegen-test/smithy-build.json +++ b/codegen/smithy-go-codegen-test/smithy-build.json @@ -6,14 +6,14 @@ "module": "github.com/aws/smithy-go/internal/tests/service/weather", "moduleVersion": "0.0.1", "generateGoMod": true, - "goDirective": "1.18" + "goDirective": "1.21" }, "go-server-codegen": { "service": "example.weather#Weather", "module": "github.com/aws/smithy-go/internal/tests/server/weather", "moduleVersion": "0.0.1", "generateGoMod": true, - "goDirective": "1.18" + "goDirective": "1.21" } } } diff --git a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoModuleInfo.java b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoModuleInfo.java index 881ccf7d..339be9f5 100644 --- a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoModuleInfo.java +++ b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoModuleInfo.java @@ -27,7 +27,7 @@ public final class GoModuleInfo { - public static final String DEFAULT_GO_DIRECTIVE = "1.15"; + public static final String DEFAULT_GO_DIRECTIVE = "1.21"; private List dependencies; diff --git a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java index b207f472..4ac649fe 100644 --- a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java +++ b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java @@ -92,7 +92,7 @@ public static GoSettings from(ObjectNode config, ArtifactType artifactType) { settings.setModuleDescription(config.getStringMemberOrDefault( MODULE_DESCRIPTION, settings.getModuleName() + " client")); settings.setModuleVersion(config.getStringMemberOrDefault(MODULE_VERSION, null)); - settings.setGenerateGoMod(config.getBooleanMemberOrDefault(GENERATE_GO_MOD, false)); + settings.setGenerateGoMod(config.getBooleanMemberOrDefault(GENERATE_GO_MOD, true)); settings.setGoDirective(config.getStringMemberOrDefault(GO_DIRECTIVE, GoModuleInfo.DEFAULT_GO_DIRECTIVE)); return settings; }