This tool generates sandbox Go project in temporary files directory and opens it in editor. An editor from $EDITOR
environment variable is used, if set. Otherwise Visual Studio Code's code
command is used by default.
Generated project consists of two files:
├── go.mod
└── main.go
go.mod
file is created by tool using go mod init sandbox
command (so module is of a version of Go toolchain installed in your system).
With a correctly configured Go toolchain run
go install github.com/electrofocus/sandbox@latest
To open editor with fresh project run
sandbox
By default, project is located in temporary directory. Pass a path to existing directory as command argument to use custom location for project
sandbox /Users/John/Documents