(variablesFile string)
| 196 | } |
| 197 | |
| 198 | func parseVariableValuesFromFile(variablesFile string) ([]VariableValue, error) { |
| 199 | var values []VariableValue |
| 200 | if variablesFile == "" { |
| 201 | return values, nil |
| 202 | } |
| 203 | |
| 204 | variablesMap, err := createVariablesMapFromFile(variablesFile) |
| 205 | if err != nil { |
| 206 | return nil, err |
| 207 | } |
| 208 | |
| 209 | for name, value := range variablesMap { |
| 210 | values = append(values, VariableValue{ |
| 211 | Name: name, |
| 212 | Value: value, |
| 213 | }) |
| 214 | } |
| 215 | return values, nil |
| 216 | } |
| 217 | |
| 218 | // Reads a YAML file and populates a string -> string map. |
| 219 | // Throws an error if the file name is empty. |
no test coverage detected