This repo contains templates used by DevStream plugin "repo-scaffolding" (thereafter: the plugin).
This repo isn't intended to be used directly without DevStream. It should only be consumed by the plugin automatically.
The plugin (together with this repo of templates) can create a repo in GitHub and set up the project layout and initialize the reop with necessary files that are typical for a Go web app. The followings can be created automatically:
- a Go web app example (source code from here) with the Gin Web Framework
- directory structure, following Standard Go Project Layout best practice
.gitignore
, generated by Toptal | gitignore.io with minimum changes- Makefile, with install/dev/build/clean
- Dockerfile, with multistage build
- a simplified Helm chart with Deployment and Service
- Render all files using go template whose name end with
.tpl
suffix. - Files whose name don't end with
.tpl
extension don't need to be rendered. - subdirectory "helm/app_name" (the app_name part) should be rendered with
AppName
- subdicrectory "cmd/app_name" (the app_name part) should be rendered with
AppName
Example of required parameters to render these templates:
AppName: my-hello-world
Repo:
Owner: ironcore864
Name: my-hello-world
ImageRepo: ironcore864/my-hello-world # dockerhub
dtm-repo-scaffolding-golang-gin
is synced from https://github.com/devstream-io/devstream/blob/main/staging/dtm-repo-scaffolding-golang-gin.
Code changes are made in that location, merged into devstream-io/devstream
and later synced here.