Skip to content

Commit

Permalink
Merge pull request #321 from werf/feat-extra
Browse files Browse the repository at this point in the history
feat(dynamic): expose more Attributes, add more options for Tracker
  • Loading branch information
ilya-lesikov authored Dec 28, 2023
2 parents dc5a3d2 + 51dbaa7 commit 8be189a
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 8be189a

Please sign in to comment.