Skip to content

Commit

Permalink
imports still included in descriptor even when --include_imports not …
Browse files Browse the repository at this point in the history
…set (#23)
  • Loading branch information
jhump authored Jul 19, 2019
1 parent 33bc7bb commit eafc143
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/goprotoc/goprotoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ func toFileDescriptorSet(alreadySeen, fileNames map[string]struct{}, fdSet *desc
for _, dep := range fd.GetDependencies() {
if !includeImports {
// we only include deps that were explicitly in the set of file names given
if _, ok := fileNames[fd.GetName()]; !ok {
if _, ok := fileNames[dep.GetName()]; !ok {
continue
}
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func PluginMain(plugin Plugin) {
os.Stdout = os.Stderr

if err := RunPlugin(os.Args[0], plugin, os.Stdin, output); err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
_, _ = fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1)
}
// Success!
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ type ProtocVersion struct {

func (v ProtocVersion) String() string {
var buf bytes.Buffer
fmt.Fprintf(&buf, "%d.%d.%d", v.Major, v.Minor, v.Patch)
_, _ = fmt.Fprintf(&buf, "%d.%d.%d", v.Major, v.Minor, v.Patch)
if v.Suffix != "" {
if v.Suffix[0] != '-' {
buf.WriteRune('-')
Expand Down

0 comments on commit eafc143

Please sign in to comment.