Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update go-generated.md #131

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions content/reference/go/go-generated.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ Where in the output directory the generated `.pb.go` file is placed depends on
the compiler flags. There are several output modes:

- If the `paths=import` flag is specified, the output file is placed in a
directory named after the Go package's import path. For example, an input
directory named after the Go package's import path (e.g., provided by
the `go_package` option within the `.proto` file). For example, an input
file `protos/buzz.proto` with a Go import path of
`example.com/project/protos/fizz` results in an output file at
`example.com/project/protos/fizz/buzz.pb.go`. This is the default output
mode if a `paths` flag is not specified.
- If the `module=$PREFIX` flag is specified, the output file is placed in a
directory named after the Go package's import path, but with the specified
directory named after the Go package's import path (e.g., provided by
the `go_package` option within the `.proto` file), but with the specified
directory prefix removed from the output filename. For example, an input
file `protos/buzz.proto` with a Go import path of
`example.com/project/protos/fizz` and `example.com/project` specified as the
Expand Down
Loading