StringSliceFile defines string slice from file env var descriptor. The file path is read from CLI args (--{cliArgName}) or falls back to the env variable. Each line in the file becomes an entry. Empty lines and lines starting with # are ignored.
(name string)
| 189 | // The file path is read from CLI args (--{cliArgName}) or falls back to the env variable. |
| 190 | // Each line in the file becomes an entry. Empty lines and lines starting with # are ignored. |
| 191 | func StringSliceFile(name string) StringSliceVar { |
| 192 | return StringSliceVar{ |
| 193 | Name: name, |
| 194 | format: "path to file with one entry per line", |
| 195 | parseFn: parseStringSliceFile, |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | // URLReplacements parses URL replacements from the environment variable |
| 200 | func URLReplacements(name string) URLReplacementVar { |
no outgoing calls