Skip to content

Commit

Permalink
skip license check on go.mod; add generator comment
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismarget-j committed Oct 22, 2024
1 parent 2d19663 commit fcffc02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .ci/scripts/license_header_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ skip_regexes+=("^README.md$")
skip_regexes+=("^Third_Party_Code/.*$")
skip_regexes+=("^\.gitignore$")
skip_regexes+=("^\.notices.tpl$")
skip_regexes+=("^go.mod$")
skip_regexes+=("^go.sum$")

copyright_template="Copyright \\(c\\) Juniper Networks, Inc\\., %s-%s\\."
arr_line="All rights reserved\."
Expand Down
1 change: 1 addition & 0 deletions apstra/enum/generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ func handleVar(gd *ast.GenDecl) error {
// Fill the TypeNameToInfo map which is used by render()
var typeInfo TypeInfo
if typeInfo, ok = TypeNameToInfo[tName]; !ok {
// entry not found - create one with the plural version of the type name included
typeInfo.Plural = Pluralize.Plural(tName)
if tName == typeInfo.Plural {
return fmt.Errorf("cannot pluralize - plural of %q is %q", tName, typeInfo.Plural)
Expand Down

0 comments on commit fcffc02

Please sign in to comment.