Skip to content

Commit 82f4d80

Browse files
committed
Generator: Add UID to naming replacement list
1 parent a4f9cbb commit 82f4d80

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

internal/build/utils/naming.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ var (
3535
)
3636

3737
// APIToGo returns the Go version of API call, eg. cluster.health => ClusterHealth
38-
//
3938
func APIToGo(s string) string {
4039
ep := strings.Split(s, ".")
4140
ns := make([]string, len(ep))
@@ -51,7 +50,6 @@ func APIToGo(s string) string {
5150
}
5251

5352
// NameToGo returns a Go version of name, eg. node_id => NodeID.
54-
//
5553
func NameToGo(s string, api ...string) string {
5654
exceptions := map[string]string{
5755
"index": "Index",
@@ -64,6 +62,7 @@ func NameToGo(s string, api ...string) string {
6462
"ip": "IP",
6563
"id": "ID",
6664
"ttl": "TTL",
65+
"uid": "UID",
6766

6867
"api": "API",
6968
"ccr": "CCR",
@@ -128,7 +127,6 @@ func NameToGo(s string, api ...string) string {
128127
}
129128

130129
// TypeToGo returns a Go version of type, eg. boolean => *bool.
131-
//
132130
func TypeToGo(s string, comment ...bool) string {
133131
// If the string contains a pipe character, it's a polymorphic parameter,
134132
// ie. it takes heterogeous values, such as "boolean" and "number"

0 commit comments

Comments
 (0)