MCPcopy Create free account
hub / github.com/Scalingo/cli / readFromCmdLine

Function readFromCmdLine

env/edit.go:116–128  ·  view source on GitHub ↗
(ctx context.Context, variables map[string]string, params []string)

Source from the content-addressed store, hash-verified

114}
115
116func readFromCmdLine(ctx context.Context, variables map[string]string, params []string) (map[string]string, error) {
117 for _, param := range params {
118 err := isEnvEditValid(param)
119 if err != nil {
120 return nil, errors.Newf(ctx, "'%s' is invalid: %s", param, err)
121 }
122
123 name, value := parseVariable(param)
124 variables[name] = value
125 }
126
127 return variables, nil
128}
129
130func readFromFile(ctx context.Context, filePath string) (map[string]string, error) {
131 if filePath == "" {

Callers 1

AddFunction · 0.85

Calls 2

isEnvEditValidFunction · 0.85
parseVariableFunction · 0.85

Tested by

no test coverage detected