From 7f3b820e55229a79158c5bd639716b45260d1786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Madrigal=20=F0=9F=90=A7?= <599908+Madrigal@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:56:23 -0500 Subject: [PATCH] Change defaults when generating a client via smithy CLI --- .../java/software/amazon/smithy/go/codegen/GoModuleInfo.java | 2 +- .../main/java/software/amazon/smithy/go/codegen/GoSettings.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }