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)
| 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. |
| 283 | func 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 | // |
no outgoing calls
no test coverage detected
searching dependent graphs…