A command-line tool to quickly scaffold new Go projects with a standardized structure and configuration.
- Creates a new Go project with a single command
- Sets up proper module naming and directory structure
- Initializes git repository
- Configures go modules automatically
- Installs dependencies
You can install gog directly using Go:
go install github.com/mohamedalosaili/gog/cmd/gog@latest
After installation, ensure the Go bin directory is in your PATH:
Add this line to your ~/.bashrc
, ~/.zshrc
, or equivalent shell configuration file:
open ~/.bashrc
/~/.zshrc
file
nano ~/.bashrc
#or
nano ~/.zshrc
Add this line to the file:
export PATH=$PATH:$(go env GOPATH)/bin
gog new <project-name>
- If you encounter any issues, while updating the version try this:
go clean -modcache
rm -rf $GOPATH/pkg/mod/cache/download/github.com/mohamedalosaili/gog
go install github.com/mohamedalosaili/gog/cmd/gog@v<version>