Skip to content

Commit b7650f3

Browse files
committed
language undefined to english
1 parent 9709818 commit b7650f3

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

cmd/tftemplate/models/resource.go

+14-13
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ import (
88
)
99

1010
type ResourceTemplate struct {
11-
LocalityAdjectiveUpper string // Regional/Zoned
12-
LocalityAdjective string // regional/zoned
13-
LocalityUpper string // Region
14-
Locality string // region
15-
Resource string // FunctionNamespace
16-
ResourceClean string // Namespace
17-
ResourceCleanLow string // namespace
18-
ResourceHCL string // function_namespace
19-
API string // function
20-
APIFirstLetterUpper string
11+
LocalityAdjectiveUpper string // Regional/Zoned
12+
LocalityAdjective string // regional/zoned
13+
LocalityUpper string // Region
14+
Locality string // region
15+
Resource string // FunctionNamespace
16+
ResourceClean string // Namespace
17+
ResourceCleanLow string // namespace
18+
ResourceFistLetterUpper string
19+
ResourceHCL string // function_namespace
20+
API string // function
21+
APIFirstLetterUpper string // Function
2122

2223
SupportWaiters bool // If resource have waiters
2324
}
@@ -27,8 +28,8 @@ func isUpper(letter uint8) bool {
2728
return unicode.IsUpper(r) || unicode.IsDigit(r)
2829
}
2930

30-
func APIfirstLetterUpper(api string) string {
31-
capitalized := cases.Title(language.Und).String(api)
31+
func FirstLetterUpper(string string) string {
32+
capitalized := cases.Title(language.English).String(string)
3233
return capitalized
3334
}
3435

@@ -111,6 +112,6 @@ func NewResourceTemplate(api string, resource string, locality string) ResourceT
111112
ResourceCleanLow: cleanResource(api, resource, false),
112113
ResourceHCL: strings.Join(resourceWordsLower(resource), "_"),
113114
API: api,
114-
APIFirstLetterUpper: APIfirstLetterUpper(api),
115+
APIFirstLetterUpper: FirstLetterUpper(api),
115116
}
116117
}

0 commit comments

Comments
 (0)