Skip to content

Commit

Permalink
Add UUID to initialism (#244)
Browse files Browse the repository at this point in the history
Generating `EventSourceMapping` resource in the lambda controller
produces a CRD FIeld with a json tag `uUID`. This commit makes sure
that `UUID` names stay intact during code generation.

Description of changes:
- Add `UUID` to initialisms

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
a-hilaly authored Nov 16, 2021
1 parent 921f3aa commit 2965d26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/names/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ var (
// Need to prevent "security" from becoming "SecURIty"
{"Uri", "URI", "uri", regexp.MustCompile("(?!sec)uri(?!ty)|(Uri)", regexp.None)},
{"Url", "URL", "url", nil},
{"Uuid", "UUID", "uuid", nil},
{"Vlan", "VLAN", "vlan", nil},
{"Vpc", "VPC", "vpc", nil},
{"Vpn", "VPN", "vpn", nil},
Expand Down
1 change: 1 addition & 0 deletions pkg/names/names_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func TestNames(t *testing.T) {
{"Vlan", "VLAN", "vlan", "vlan"},
{"Ecmp", "ECMP", "ecmp", "ecmp"},
{"Ena", "ENA", "ena", "ena"},
{"UUID", "UUID", "uuid", "uuid"},
}
for _, tc := range testCases {
n := names.New(tc.original)
Expand Down

0 comments on commit 2965d26

Please sign in to comment.