title: How correctly import protobuf's files?
body: <p>Inside <code>city.proto</code> file I want to use (import) protobuf's <code>.proto</code> files. In my golang application I use go modules.</p>
  
  <p><strong>city.proto</strong>:</p>
  
  <pre><code>syntax = "proto3";
  
  package proto;
  
  import "google/protobuf/timestamp.proto";
  
  option go_package = "./proto";
  
  message City {
      google.protobuf.Timestamp create_at = 1;
  }
  </code></pre>
  
  <p>When I try to generate code from <code>city.proto</code> file it raise such error:</p>
  
  <pre><code>google/protobuf/timestamp.proto: File not found.
  city.proto:3:1: Import "google/protobuf/timestamp.proto" was not found or had errors.
  city.proto:25:5: "google.protobuf.Timestamp" is not defined.
  </code></pre>
  
  <p>I created a <code>proto</code> folder in the directory of my gRPC project. The <code>city.proto</code> file is located in this folder. I run such command:</p>
  
  <pre><code>protoc -I proto/ proto/city.proto --go_out=plugins=grpc:proto/city.
  </code></pre>
  
  <p>This command works only in cases when I don't use import in the proto file.</p>
  
  <p><strong>go version</strong>:</p>
  
  <pre><code>go version go1.12.9 windows/amd64
  </code></pre>
  
  <p><strong>protoc --version</strong>:</p>
  
  <pre><code>libprotoc 3.11.4
  </code></pre>
  
  <p><strong>echo %GOPATH%</strong>:</p>
  
  <pre><code>C:\Users\NNogerbek\go
  </code></pre>
  
  <p>Inside that directory I see three folders with such structure:</p>
  
  <pre><code>bin
      protoc.exe
      protoc-gen-go.exe
  pkg
      mod
          **packages**
  src
      google.com
          protobuf
              timestamp.proto
  </code></pre>
  
  <p>I run such command:</p>
  
  <pre><code>go list -f "{{ .Path }} {{ .Dir }}" -m github.com/golang/protobuf
  </code></pre>
  
  <p>Command result:</p>
  
  <pre><code>github.com/golang/protobuf C:\Users\NNogerbek\go\pkg\mod\github.com\golang\protobuf@v1.4.0
  </code></pre>