Skip to content

Commit

Permalink
Change defaults when generating a client via smithy CLI (#558)
Browse files Browse the repository at this point in the history
* Change defaults when generating a client via smithy CLI
  • Loading branch information
Madrigal authored Dec 18, 2024
1 parent bed421c commit 95ba318
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions codegen/smithy-go-codegen-test/smithy-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<SymbolDependency> dependencies;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 95ba318

Please sign in to comment.