MCPcopy Create free account
hub / github.com/devspace-sh/devspace / sanitizeMatchExpression

Function sanitizeMatchExpression

pkg/devspace/config/versions/versions.go:344–349  ·  view source on GitHub ↗
(expression string)

Source from the content-addressed store, hash-verified

342}
343
344func sanitizeMatchExpression(expression string) string {
345 exp := strings.TrimPrefix(expression, "^")
346 exp = strings.TrimSuffix(exp, "$")
347 exp = fmt.Sprintf("^%s$", exp)
348 return exp
349}
350
351func resolveVariableValue(ctx context.Context, name string, resolver variable.Resolver) (string, error) {
352 val, err := resolver.FillVariables(ctx, "${"+name+"}", true)

Callers 2

matchEnvironmentFunction · 0.85
matchVarsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected