Last active
December 20, 2015 02:59
-
-
Save timrandg/6060310 to your computer and use it in GitHub Desktop.
where to store package main
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
├── 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