StringSliceVar defines a new string slice with the specified name. The argument p points to a string slice variable in which to store the value of the environment var.
(p *[]string, name string, value ...string)
| 171 | // points to a string slice variable in which |
| 172 | // to store the value of the environment var. |
| 173 | func StringSliceVar(p *[]string, name string, value ...string) { |
| 174 | *p = value |
| 175 | funcs = append(funcs, func() bool { |
| 176 | if s := os.Getenv(name); s != "" { |
| 177 | a := strings.Split(s, ",") |
| 178 | *p = a |
| 179 | } |
| 180 | return true |
| 181 | }) |
| 182 | } |
| 183 | |
| 184 | // Parse parses known env vars |
| 185 | // and assigns the values to the variables |
no outgoing calls