Go cookbook Simple Go recipes Assuming Go is installed in your box, you can run the code living in every directory with the following command: go run main.go For example, for running code living in basics folder: cd basics go run main.go