ParseVariables parses only the variables from the config
(data map[string]interface{}, log log.Logger)
| 105 | |
| 106 | // ParseVariables parses only the variables from the config |
| 107 | func 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 |
| 122 | func Parse(data map[string]interface{}, log log.Logger) (*latest.Config, error) { |
no test coverage detected