Only read *.pbtxt files in api_def/*_api directories when generating Go API.
PiperOrigin-RevId: 344308260 Change-Id: I1563382acd8eda94f2b46f92d2957522e1d5b79e
This commit is contained in:
parent
a7eb0f4531
commit
c498ad75dd
@ -94,6 +94,9 @@ func updateAPIDefs(m *apiDefMap, dir string) error {
|
||||
return err
|
||||
}
|
||||
for _, file := range files {
|
||||
if file.IsDir() || !strings.HasSuffix(file.Name(), ".pbtxt") {
|
||||
continue
|
||||
}
|
||||
data, err := ioutil.ReadFile(path.Join(dir, file.Name()))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to read %q: %v", file.Name(), err)
|
||||
|
Loading…
Reference in New Issue
Block a user