Skip to content

Commit

Permalink
feat(dynamic): expose more Attributes, add more options for Tracker
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
  • Loading branch information
ilya-lesikov committed Dec 28, 2023
1 parent a4a710b commit 51dbaa7
Show file tree
Hide file tree
Showing 5 changed files with 273 additions and 111 deletions.
31 changes: 17 additions & 14 deletions pkg/tracker/generic/resource_state_json_paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,20 +186,23 @@ func casify(in ...string) []string {
var result []string

for _, value := range in {
result = append(result, value)
result = append(result, strings.ReplaceAll(value, " ", ""))
result = append(result, caps.ToUpper(strings.ReplaceAll(value, " ", "")))
result = append(result, caps.ToCamel(value))
result = append(result, caps.ToKebab(value))
result = append(result, caps.ToDotNotation(value))
result = append(result, caps.ToSnake(value))
result = append(result, caps.ToTitle(value))
result = append(result, caps.ToUpper(value))
result = append(result, caps.ToLower(value))
result = append(result, caps.ToLowerCamel(value))
result = append(result, caps.ToScreamingDotNotation(value))
result = append(result, caps.ToScreamingKebab(value))
result = append(result, caps.ToScreamingSnake(value))
result = append(
result,
value,
strings.ReplaceAll(value, " ", ""),
caps.ToUpper(strings.ReplaceAll(value, " ", "")),
caps.ToCamel(value),
caps.ToKebab(value),
caps.ToDotNotation(value),
caps.ToSnake(value),
caps.ToTitle(value),
caps.ToUpper(value),
caps.ToLower(value),
caps.ToLowerCamel(value),
caps.ToScreamingDotNotation(value),
caps.ToScreamingKebab(value),
caps.ToScreamingSnake(value),
)
}

result = lo.Uniq(result)
Expand Down
Loading

0 comments on commit 51dbaa7

Please sign in to comment.