Skip to content

Latest commit

 

History

History
24 lines (22 loc) · 980 Bytes

README.md

File metadata and controls

24 lines (22 loc) · 980 Bytes

sandbox

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).

Install

With a correctly configured Go toolchain run

go install github.com/electrofocus/sandbox@latest

Use

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