MCPcopy Create free account
hub / github.com/coder/guts / splitNameAlias

Function splitNameAlias

config/imports.go:74–81  ·  view source on GitHub ↗

splitNameAlias parses entries of the form "Name" or "Name=Alias".

(s string)

Source from the content-addressed store, hash-verified

72
73// splitNameAlias parses entries of the form "Name" or "Name=Alias".
74func splitNameAlias(s string) (name, alias string) {
75 for i := 0; i < len(s); i++ {
76 if s[i] == '=' {
77 return s[:i], s[i+1:]
78 }
79 }
80 return s, ""
81}

Callers 2

TestSplitNameAliasFunction · 0.85
injectImportFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestSplitNameAliasFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…