MCPcopy Index your code
hub / github.com/devspace-sh/devspace / ParseVariables

Function ParseVariables

pkg/devspace/config/versions/versions.go:107–119  ·  view source on GitHub ↗

ParseVariables parses only the variables from the config

(data map[string]interface{}, log log.Logger)

Source from the content-addressed store, hash-verified

105
106// ParseVariables parses only the variables from the config
107func ParseVariables(data map[string]interface{}, log log.Logger) (map[string]*latest.Variable, error) {
108 strippedData, err := Get(data, "vars")
109 if err != nil {
110 return nil, errors.Wrap(err, "loading variables")
111 }
112
113 config, err := Parse(strippedData, log)
114 if err != nil {
115 return nil, errors.Wrap(err, "parse variables")
116 }
117
118 return config.Vars, nil
119}
120
121// Parse parses the data into the latest config
122func Parse(data map[string]interface{}, log log.Logger) (*latest.Config, error) {

Callers 1

reloadVariablesFunction · 0.92

Calls 2

GetFunction · 0.85
ParseFunction · 0.70

Tested by

no test coverage detected