MCPcopy Index your code
hub / github.com/coder/coder / constNameForScope

Function constNameForScope

scripts/apikeyscopesgen/main.go:134–140  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

132}
133
134func constNameForScope(name string) string {
135 resource, action := splitRA(name)
136 if action == policy.WildcardSymbol {
137 action = "All"
138 }
139 return fmt.Sprintf("APIKeyScope%s%s", pascal(resource), pascal(action))
140}
141
142func splitRA(name string) (resource string, action string) {
143 parts := strings.SplitN(name, ":", 2)

Callers 1

generateFunction · 0.85

Calls 2

splitRAFunction · 0.85
pascalFunction · 0.85

Tested by

no test coverage detected