title: Correct format of protoc go_package?
body: <p>I have an existing project in Go where I'm using Protocol buffers / gRPC. Until recent the <code>go_package</code> option was optional and the resulting Go package name would be the same as the proto package name.</p>
  
  <p>This file lives in the project root. The generated code file (<code>authenticator.pb.go</code>) is living in the same location. Proto file:</p>
  
  <pre><code>syntax = "proto3";
  
  package authenticator;
  
  service Authenticator {...}
  </code></pre>
  
  <p>Generation command specifies I want to output in the same directory:</p>
  
  <pre><code>protoc --go_out=plugins=grpc:. authenticator.proto
  </code></pre>
  
  <p>Today I've pulled new version of the protocol buffers compiler and <code>github.com/golang/protobuf/protoc-gen-go</code>. Upon the first run a got a warning:</p>
  
  <pre><code>WARNING: Missing 'go_package' option in "authenticator.proto",
  please specify it with the full Go package path as
  a future release of protoc-gen-go will require this be specified.
  See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.
  </code></pre>
  
  <p>The suggested link is more or less useless. But the tutorial is a bit more explicit:</p>
  
  <blockquote>
    <p>The go_package option defines the import path of the package which
    will contain all the generated code for this file. The Go package name
    will be the last path component of the import path. For example, our
    example will use a package name of "tutorialpb".</p>
  
  <pre><code>option go_package = "github.com/protocolbuffers/protobuf/examples/go/tutorialpb";
  </code></pre>
  </blockquote>
  
  <p>After adding this option to the proto file and rerunning the command, the output ends up in this path, relative to the project root. Something like:</p>
  
  <pre><code>$GOPATH/src/github.com/&lt;org&gt;/authenticator/github.com/&lt;org&gt;/authenticator/authenticator.pb.go
  </code></pre>
  
  <p>I've tried the following alternatives as <code>go_package</code> names:</p>
  
  <ul>
  <li><code>.</code></li>
  <li><code>authenticator</code></li>
  </ul>
  
  <p>Generation happened in the correct location, but I got the warning back:</p>
  
  <pre><code>WARNING: Deprecated use of 'go_package' option without a full import path...
  </code></pre>
  
  <p>So what is the correct way without breaking the project layout?</p>