[Golang][client] Make it possible to generate go.mod and go.sum files - fixes #2796 (#2813)

This commit is contained in:
Slavek Kabrda
2019-05-08 08:52:18 +02:00
committed by William Cheng
parent f2b1f770f8
commit 21b8160d00
7 changed files with 53 additions and 1 deletions

View File

@@ -60,7 +60,6 @@ public class GoClientCodegen extends AbstractGoCodegen {
CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS,
CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS_DESC)
.defaultValue(Boolean.FALSE.toString()));
}
@Override
@@ -95,6 +94,8 @@ public class GoClientCodegen extends AbstractGoCodegen {
supportingFiles.add(new SupportingFile("configuration.mustache", "", "configuration.go"));
supportingFiles.add(new SupportingFile("client.mustache", "", "client.go"));
supportingFiles.add(new SupportingFile("response.mustache", "", "response.go"));
supportingFiles.add(new SupportingFile("go.mod.mustache", "", "go.mod"));
supportingFiles.add(new SupportingFile("go.sum", "", "go.sum"));
supportingFiles.add(new SupportingFile(".travis.yml", "", ".travis.yml"));
if (additionalProperties.containsKey(WITH_GO_CODEGEN_COMMENT)) {