MCPcopy Create free account
hub / github.com/datastack-net/dockerized / ExtractVariablesFromString

Function ExtractVariablesFromString

pkg/dockerized.go:596–603  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

594}
595
596func ExtractVariablesFromString(value string) []string {
597 var usedVariables []string
598 pattern := regexp.MustCompile(`\${([^}]+)}`)
599 for _, match := range pattern.FindAllStringSubmatch(value, -1) {
600 usedVariables = append(usedVariables, match[1])
601 }
602 return usedVariables
603}

Callers 1

ExtractVariablesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected