I\'m a newcomer to Go. I extremely like the language, but I quickly realised that I needed to start dividing my files due to an increase in program size.
go r
If i understand your question right, you need import other code as libraries.
Little example
./testing/main.go:
package main
import "fmt"
import L "testing/lib"
func main() {
fmt.Println("Hello from main()")
L.Somefunc()
}
./testing/lib/somelib.go:
package lib
import "fmt"
func Somefunc() {
fmt.Println("Hello from Somefunc()")
return
}
To launch - go run main.go