Go Package - a tool to create go packages
- Create Go packages with a source code file and a test code file.
- Additionally omit the directory hierachy for a top-level package.
- Additionally create a command (a.k.a.) main package.
- Additionally add a structure with a New(), and String() function.
# latest version
go install github.com/bsmr/gp/cmd/gp@latest
# specify version
go install github.com/bsmr/gp/cmd/gp@v0.0.2
# install from source
go install ./cmd/gp
# create a new package
gp -name MODULE
# to overwrite existing files
gp -name MODULE -force
# create a top-level package
gp -name MODULE -top
# create a main program
gp -name MODULE -cmd