title: Go 1.12 modules: local import in non-local import
body: <p>I'm currently using Go 1.12 modules and really tired about importing.</p>
  
  <p>I'm making the rest-api using gin(web microservices) and gorm(golang orm). Everything still ok while working in golang modules. But getting trouble with local packages importing</p>
  
  <p>The directory tree:</p>
  
  <p><a href="https://i.stack.imgur.com/lTB3Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lTB3Y.png" alt="project tree"></a></p>
  
  <p>The go.mod:</p>
  
  <pre><code>module github.com/Aragami1408/go-gorm
  
  go 1.12
  
  require (
      github.com/gin-gonic/gin v1.4.0
      github.com/jinzhu/gorm v1.9.9
      github.com/lib/pq v1.1.1
      github.com/satori/go.uuid v1.2.0
  )
  
  </code></pre>
  
  <p>The db.go: </p>
  
  <pre class="lang-golang prettyprint-override"><code>package db
  
  //code below...
  </code></pre>
  
  <p>The tasks.go: </p>
  
  <pre class="lang-golang prettyprint-override"><code>package task
  
  import (
      "../db"
  )
  </code></pre>
  
  <p>But when I run and still get this error:</p>
  
  <p><code>local import "../db" in non-local package</code></p>
  
  <p>I've searched a lot on google and nothing helps</p>