(envStr string)
| 81 | } |
| 82 | |
| 83 | func EnvToSlice(envStr string) []string { |
| 84 | envLines := strings.Split(envStr, "\x00") |
| 85 | result := make([]string, 0, len(envLines)) |
| 86 | for _, line := range envLines { |
| 87 | if len(line) == 0 { |
| 88 | continue |
| 89 | } |
| 90 | result = append(result, line) |
| 91 | } |
| 92 | return result |
| 93 | } |
| 94 | |
| 95 | func SliceToMap(env []string) map[string]string { |
| 96 | envMap := make(map[string]string) |
no outgoing calls
no test coverage detected