title: Golang relative package import after renaming
body: <p>My $GOPATH is </p>
  
  <pre><code>"/Users/peter/goworkspace"
  </code></pre>
  
  <p>My current golang version:</p>
  
  <pre><code>go version go1.6 darwin/amd64
  </code></pre>
  
  <p>I have multiple golang projects under this workspace, so here is the the structure of directories</p>
  
  <pre><code>+/goworkspace  
    +---/bin  
    +---/pkg  
    +---/src  
      +---/project1
          +---package1 
             +---file1.go 
             +---file2.go 
             +---file3.go 
          +---package2 
          +---package3 
          +---main.go 
      +---/project2
      +---/project3
  </code></pre>
  
  <p>In my proj1's main.go, I will use the imports from other packages under this project, it will look like:  </p>
  
  <pre><code>import(  
       "./package1"      
       "./package2"      
       "./package3"
   )  
  </code></pre>
  
  <p>however when I run "go build",I'm keeping getting error saying:<br>
  "
  <strong>can't load package:  local import "../package" in non-local package</strong></p>
  
  <p>If I prefer not to use relative package path, for example use it like:</p>
  
  <pre><code>import(
      "project1/package1"  
      "project1/package2"   
      "project1/package3"   
  )  
  </code></pre>
  
  <p>then everything will work.  </p>
  
  <p>What is wrong with my code if I use the relative package path?<br>
  And what is the best practice for package import if the project1's name will change in the future, for example it is changed to projecet1v2?<br>
  Do I need to manually update the imported package's name then?</p>