MCPcopy Create free account
hub / github.com/github/copilot-sdk / setEnvValue

Function setEnvValue

go/client.go:283–292  ·  view source on GitHub ↗

setEnvValue returns a copy of env with all existing entries for key removed and a single trailing KEY=VALUE entry added so SDK-managed values win deterministically.

(env []string, key string, value string)

Source from the content-addressed store, hash-verified

281// setEnvValue returns a copy of env with all existing entries for key removed and
282// a single trailing KEY=VALUE entry added so SDK-managed values win deterministically.
283func setEnvValue(env []string, key string, value string) []string {
284 prefix := key + "="
285 filtered := make([]string, 0, len(env)+1)
286 for _, entry := range env {
287 if !strings.HasPrefix(entry, prefix) {
288 filtered = append(filtered, entry)
289 }
290 }
291 return append(filtered, key+"="+value)
292}
293
294// parseCLIURL parses a CLI URL into host and port components.
295//

Callers 1

startCLIServerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…