title: go mod: cannot find module providing package
body: <p>I am creating a go project with version 1.12.1.
  If I run <code>GOPATH="$(pwd)/vendor:$(pwd)" GOBIN="$(pwd)/bin" go clean</code> I get the following error:</p>
  
  <pre><code>can't load package: package github.com/marvincaspar/go-example: unknown import path "github.com/marvincaspar/go-example": cannot find module providing package github.com/marvincaspar/go-example
  </code></pre>
  
  <p>This is only for <code>go clean</code>, <code>go run</code> or <code>go build</code> works fine.</p>
  
  <p>Here is the folder structure of main code:</p>
  
  <pre><code>.
  ├── Makefile
  ├── cmd
  │   └── server
  │       └── main.go
  ├── go.mod
  ├── go.sum
  └── pkg
      └── storage
          └── mysql
              └── storage.go
  </code></pre>
  
  <p>Here is how the <code>go.mod</code> file looks like:</p>
  
  <pre><code>module github.com/marvincaspar/go-example
  go 1.12
  
  require (
      github.com/go-sql-driver/mysql v1.4.1
  )
  </code></pre>
  
  <p>And finally the <code>main.go</code> file:</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "os"
  
      "github.com/marvincaspar/go-example/pkg/storage/mysql"
  )
  
  func main() {
      if err := run(); err != nil {
          fmt.Fprintf(os.Stderr, "%v", err)
          os.Exit(1)
      }
  }
  
  func run() error {
      // init storage
      s := mysql.NewStorage()
      // do some other stuff...
  }
  
  </code></pre>
  
  <p>Any ideas what I am doing wrong?</p>