Packages



.
├── src
│   └── github.com
│         └── szabgab
│                └── myrepo
│                      └── mymath.go
├── bin
├── pkg
    └── use.go


examples/package-example/use.go
package main

import (
    "fmt"
    "math"
    "mymath"
)

func main() {
    fmt.Println("Hello World")

    fmt.Println(math.Pi)
    fmt.Println(math.Sin(3))

    fmt.Println(mymath.Add(3, 7))
}

examples/package-example/src/mymath/mymath.go
package mymath

func Add(x, y int) int {
    return x + y
}

GOPATH=$(pwd) go run use.go