Q:

Golang Importing Issue

I'm trying to use import a package for internal use, but I have been having some issues.
My directory structure looks like this:
  app/
    model/
      file1.go
      file2.go
      ...
    main.go

When I try to build the program, I get an error that looks something like this:
/usr/local/go/src/pkg/model (from $GOROOT)

I want to be able to call the model programs in any of my other programs in the app simply using:
import "app/model"

What are my options when it comes to doing this? 

A:

You import from GOPATH level .. all of your packages should live there.
For example, assuming your application is here:
$GOPATH/src/dtrinh100/app/

..and your package you wish to import is here:
$GOPATH/src/github.com/other/package

Your import would be:
import "github.com/other/package"

You should review the literature around what the GOPATH environment variable is all about. When beginning Go, it is important you understand its purpose and initially, you should place all of your projects/packages inside of the GOPATH.

