Skip to content

Commit

Permalink
fix(internal/gapicgen): don't try to make snippets for non-gapics (#5919
Browse files Browse the repository at this point in the history
)
  • Loading branch information
codyoss committed Apr 20, 2022
1 parent a195835 commit c94dddc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/gapicgen/gensnippets/gensnippets.go
Expand Up @@ -133,6 +133,11 @@ func processExamples(pkg *doc.Package, fset *token.FileSet, trimPrefix, rootDir,
if err != nil {
return []error{err}
}
if apiInfo == nil {
// There was no gapic_metadata.json, skip processing examples for
// non gapic lib.
return nil
}

regionTags := apiInfo.RegionTags()
if len(regionTags) == 0 {
Expand Down

0 comments on commit c94dddc

Please sign in to comment.