title: Go can't find my local package
body: <p>I am getting the following error when trying to build a go project I am working on. </p>
  
  <pre><code>cannot find package "github.com/user/projectname/models" in any of:
      /usr/local/go/src/github.com/user/projectname/models (from $GOROOT)
      /Users/username/go/src/github.com/user/projectname/models (from $GOPATH)
  </code></pre>
  
  <p>This error is confusing me as the package is located in the directory from goroot. I have 3 go files there with models defined in them. When I run 'go build' or 'go install' in the models directory, no errors are returned. I am new to go and believe I must be missing something simple. I am using a mac and my github username directory shows up as github.com:user instead of github.com/username. Could that make a difference?</p>
  
  <p>Class to import model snippet:</p>
  
  <pre><code>package dal
  
  import (
      "database/sql"
      "log"
  
      "github.com/user/projectname/models"
  )
  </code></pre>
  
  <p>Model class: </p>
  
  <pre><code>package models
  
  import "time"
  
  //Album of an artist.
  type Album struct {
      ID          int       `json:"id"`
      Title       string    `json:"title"`
      ArtistID    int       `json:"artist_id"`
      ReleaseDate time.Time `json:"date"`
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/euaUC.png" rel="nofollow noreferrer">Directory Setup</a></p>