"go build" and "go install"
Let’s tidy up the $GOPATH directory and only keep Go source code files left over:
# tree . ├── bin ├── pkg └── src ├── greet │ └── greet.go └── hello └── hello.go 5 directories, 2 files The greet.go is greet package which just provides one function:
# cat src/greet/greet.go package greet import "fmt" func Greet() { fmt.Println("नमस्ते किंशुक!") } While hello.go is a main package which takes advantage of greet and can be built into an executable binary:
[Read More]