mkdir -p ~/bin
ln -s $PWD/goid.sh ~/bin/go
modulePath=<module-path> # Example: mby.fr/mass
mkdir -p src/$modulePath
cd src/$modulePath
go mod init $modulePath
go get github.com/spf13/cobra/cobra
go install github.com/spf13/cobra/cobra
ln -s $PWD/bin/cobra ~/bin/cobra
export GOPATH=$PWD
cd src/mby.fr/mass
cobra help
cobra add test
To launch all unit tests there is a conveniant script:
./unittest.sh
To launch unit test on an entire go module:
cd <my_go_module>
go test -cover ./...
Initialize a new workspace.
- Create a new workspace directory
- Create a hidden cache dire .mass
- Create a settings file mass.yaml
- Create the default minimal config for dev, stage and prod envs
Initialize a new environment.
- Create a new env directory
Initialize a new project.
- Create a new project directory
Display all versions in a project ?
Bump a version.