Skip to content

Instantly share code, notes, and snippets.

@timrandg
Last active December 20, 2015 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timrandg/6060310 to your computer and use it in GitHub Desktop.
Save timrandg/6060310 to your computer and use it in GitHub Desktop.
where to store package main
├── bin
├── pkg
│ └── darwin_amd64
│ └── file.a
├── src
│ └── file
│ └── file.go
└── test.go
Within the partent of src, create the package.main file (in this case called test.go).
make sure subl has a /Users/Tim/Library/Application Support/Sublime Text 2/Packages/User/GoSublime.sublime-settings file with
{
"env": { "GOPATH": "$HOME/Google_Drive/go:$GS_GOPATH" }
}
This env setting allows build to look for packages relative to the current file.
#test.go
#_______________________
package main
import (
"file"
"fmt"
)
func main() {
fmt.Println(file.TestFunc("hello world"))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment