title: Importing pb.go file in a project
body: <p>How can I import my generated <code>pb.go</code> file so I can call the methods in them? I visited all the examples for go and they all seem to import with <code>github.com/...</code></p>
  
  <p><strong>Example.go</strong></p>
  
  <pre><code>import (
      "github.com/go-chi/chi"
      chiMiddleware "github.com/go-chi/chi/middleware"
      "google.golang.org/grpc"
      "net/http"
      "github.com/easyCZ/grpc-web-hacker-news/server/hackernews"
      hackernews_pb "github.com/easyCZ/grpc-web-hacker-news/server/proto" // Proto directory.
      "google.golang.org/grpc/grpclog"
      "github.com/improbable-eng/grpc-web/go/grpcweb"
      "github.com/go-chi/cors"
      "github.com/easyCZ/grpc-web-hacker-news/server/proxy"
      "github.com/easyCZ/grpc-web-hacker-news/server/middleware"
  )
  
  func main() {
      grpcServer := grpc.NewServer()
      hackernewsService := hackernews.NewHackerNewsService(nil)
      hackernews_pb.RegisterHackerNewsServiceServer(grpcServer, hackernewsService)
      ...
  
  </code></pre>
  
  <p><strong>Directory Structure</strong></p>
  
  <pre><code>athena-server
   ┣ proto
   ┃ ┣ athena.pb.go
   ┃ ┗ athena.proto
   ┣ server
   ┃ ┗ server.go
   ┣ .DS_Store
   ┣ docker-compose.yml
   ┣ generated.go
   ┣ go.mod
   ┣ go.sum
   ┣ google_service.json
   ┣ gqlgen.yml
   ┣ models_gen.go
   ┣ resolver.go
   ┣ schema.graphql
   ┗ todo.go
  </code></pre>
  
  <p><strong>main.go</strong></p>
  
  <pre><code>import (
      "bytes"
      "flag"
      "fmt"
      "log"
      "net/http"
      "os"
  
      "google.golang.org/grpc"
      "google.golang.org/grpc/grpclog"
  
      "github.com/improbable-eng/grpc-web/go/grpcweb"
  
      auth "../proto" // Proto directory but doesn't work.
  )
  ...
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>cannot find module for path _/Users/xxx/go/src/athena-server/proto
  </code></pre>
  
  <p>I tried all sort both absolute and relative path as well as shifting files around but nothing seems to work.</p>