MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / leadingEnvName

Function leadingEnvName

tools/bash/tokenizer.go:199–209  ·  view source on GitHub ↗
(token string)

Source from the content-addressed store, hash-verified

197}
198
199func leadingEnvName(token string) string {
200 if !strings.Contains(token, "=") {
201 return ""
202 }
203 vars := strings.SplitN(token, "=", 2)
204 name := vars[0]
205 if !envNameRe.MatchString(name) {
206 return ""
207 }
208 return name
209}
210
211func StripSafeEnvVars(command string) string {
212 cleaned := strings.TrimLeftFunc(command, unicode.IsSpace)

Callers 1

StripSafeEnvVarsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected