From eb8befc77c3310ccb92ed7abc23862b8c811632f Mon Sep 17 00:00:00 2001 From: Matthieu 'JP' DERASSE Date: Tue, 9 Aug 2022 16:25:11 +0000 Subject: [PATCH] feat(init): Prepare Project skeleton structure --- .../api_types/go_swagger/create_project_skeleton.go | 13 +++++++++++++ templates/gin-gonic/.empty | 0 templates/go-swagger/.empty | 0 templates/go-swagger/Makefile.go.tmpl | 11 +++++++++++ templates/mojolicious/.empty | 0 5 files changed, 24 insertions(+) create mode 100644 helpers/api_types/go_swagger/create_project_skeleton.go create mode 100644 templates/gin-gonic/.empty create mode 100644 templates/go-swagger/.empty create mode 100644 templates/go-swagger/Makefile.go.tmpl create mode 100644 templates/mojolicious/.empty diff --git a/helpers/api_types/go_swagger/create_project_skeleton.go b/helpers/api_types/go_swagger/create_project_skeleton.go new file mode 100644 index 0000000..970dd96 --- /dev/null +++ b/helpers/api_types/go_swagger/create_project_skeleton.go @@ -0,0 +1,13 @@ +package go_swagger + +import ( + log "github.com/sirupsen/logrus" +) + +// CreateProjectSkeleton will generate all the files needed to start a new project. +// it will return a list of created files or an error +func (a APIType) CreateProjectSkeleton(path string) ([]string, error) { + log.Debugf("Starting %s create project skeleton", string(a.GetName())) + + return nil, nil +} diff --git a/templates/gin-gonic/.empty b/templates/gin-gonic/.empty new file mode 100644 index 0000000..e69de29 diff --git a/templates/go-swagger/.empty b/templates/go-swagger/.empty new file mode 100644 index 0000000..e69de29 diff --git a/templates/go-swagger/Makefile.go.tmpl b/templates/go-swagger/Makefile.go.tmpl new file mode 100644 index 0000000..45a1a5c --- /dev/null +++ b/templates/go-swagger/Makefile.go.tmpl @@ -0,0 +1,11 @@ +# Code generated by gouick; DO NOT EDIT. + +APICMD= go run cmd/{{ .AppNameKebabCase }}-server/* +CMD= env PORT=${PORT:-3000} HOST=${HOST:-0.0.0.0} $(APICMD) + + +generate: + gouick generate + +launch: + @$(CMD) \ No newline at end of file diff --git a/templates/mojolicious/.empty b/templates/mojolicious/.empty new file mode 100644 index 0000000..e69de29