Goo is a CLI tool dedicated to scaffold a Go project of which the structure follows the community recommended standards (here). Refer below for the usage guide.
- There are currently two variants of projects that can be scaffolded by Goo:
smproject dedicated for very simple use cases (eg. scripts, playground etc)lgproject dedicated for more complex use cases and is more in line with the community recommended standards
- The projects are generated according to the respective templates stored with the repository. Refer to the
assetsdirectory to find the respective templates - Both templates come with Git initialized
- Install this repository using the following line into your terminal
go install github.com/brayden-ooi/goo@latest
- You can now use the CLI tool to scaffold projects
- Use
goo nowalong with the following flags to scaffold projects
name (n): name of the project (required forsm)init (i): the url to be used forgo mod init(ifinitis passed in, size will be implicitly set tolg, otherwisesm)tmp (t): custom path to store project templates (optional)
- Example for an
smproject:goo now --name=foo - Example for an
lgproject:goo now --init=github.com/foo/foo - This CLI tool is not supported for Windows
- You can pass in a custom directory into the CLI using the
tmpflag, provided it has bothtemplate-smandtemplate-lgsubdirectories - You can fork this repository and customize the
assetsdirectory to your liking