@@ -8,16 +8,17 @@ import (
8
8
)
9
9
10
10
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
21
22
22
23
SupportWaiters bool // If resource have waiters
23
24
}
@@ -27,8 +28,8 @@ func isUpper(letter uint8) bool {
27
28
return unicode .IsUpper (r ) || unicode .IsDigit (r )
28
29
}
29
30
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 )
32
33
return capitalized
33
34
}
34
35
@@ -111,6 +112,6 @@ func NewResourceTemplate(api string, resource string, locality string) ResourceT
111
112
ResourceCleanLow : cleanResource (api , resource , false ),
112
113
ResourceHCL : strings .Join (resourceWordsLower (resource ), "_" ),
113
114
API : api ,
114
- APIFirstLetterUpper : APIfirstLetterUpper (api ),
115
+ APIFirstLetterUpper : FirstLetterUpper (api ),
115
116
}
116
117
}
0 commit comments