[go-server] Add dockerfile for building and run petstore service (#274)

* Add possibility to build and run go service in a container

* Remove tabs

* Update Pet Store server sample

* Add {{{packageName}}} instead of petstore
This commit is contained in:
sunn
2018-06-13 10:55:04 +02:00
committed by William Cheng
parent 55f9e31f81
commit 299527370e
7 changed files with 394 additions and 341 deletions

View File

@@ -110,6 +110,7 @@ public class GoServerCodegen extends AbstractGoCodegen {
*/
supportingFiles.add(new SupportingFile("openapi.mustache", "api", "openapi.yaml"));
supportingFiles.add(new SupportingFile("main.mustache", "", "main.go"));
supportingFiles.add(new SupportingFile("Dockerfile.mustache", "", "Dockerfile"));
supportingFiles.add(new SupportingFile("routers.mustache", apiPath, "routers.go"));
supportingFiles.add(new SupportingFile("logger.mustache", apiPath, "logger.go"));
writeOptional(outputFolder, new SupportingFile("README.mustache", apiPath, "README.md"));