MCPcopy
hub / github.com/docker/compose / defaultStringArrayVar

Function defaultStringArrayVar

cmd/compose/compose.go:240–244  ·  view source on GitHub ↗

get default value for a command line flag that is set by a coma-separated value in environment variable

(env string)

Source from the content-addressed store, hash-verified

238
239// get default value for a command line flag that is set by a coma-separated value in environment variable
240func defaultStringArrayVar(env string) []string {
241 return strings.FieldsFunc(os.Getenv(env), func(c rune) bool {
242 return c == ','
243 })
244}
245
246func (o *ProjectOptions) projectOrName(ctx context.Context, dockerCli command.Cli, services ...string) (*types.Project, string, error) {
247 name := o.ProjectName

Callers 1

addProjectFlagsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected