We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9125731 commit 4cd8db8Copy full SHA for 4cd8db8
main.go
@@ -33,6 +33,7 @@ import (
33
"fmt"
34
"log"
35
"os"
36
+ "path/filepath"
37
"strings"
38
39
"github.com/coreos/protodoc/parse"
@@ -127,7 +128,14 @@ func CommandFunc(cmd *cobra.Command, args []string) error {
127
128
} else {
129
for k, opts := range targetDirectories {
130
log.Println("opening", k)
- proto, err := parse.ReadDir(k, messageOnlyFromThisFile)
131
+ c1 := filepath.Base(filepath.Dir(messageOnlyFromThisFile))
132
+ c2 := filepath.Base(k)
133
+ bs := ""
134
+ if c1 == c2 {
135
+ bs = messageOnlyFromThisFile
136
+ log.Println("message only from this file:", messageOnlyFromThisFile)
137
+ }
138
+ proto, err := parse.ReadDir(k, bs)
139
if err != nil {
140
return err
141
}
0 commit comments