MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / StringSliceFile

Function StringSliceFile

env/types.go:191–197  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
191func 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
200func URLReplacements(name string) URLReplacementVar {

Callers 2

config.goFile · 0.92
TestStringSliceFileFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestStringSliceFileFunction · 0.74