1f2e20e106
This is just a frame for command that will execute docker container with ISO builder scripts Change-Id: I59a5c494785af3cbcffd3b9f6a488d93f73f4878
18 lines
327 B
Go
18 lines
327 B
Go
package util
|
|
|
|
import (
|
|
"io/ioutil"
|
|
|
|
"sigs.k8s.io/yaml"
|
|
)
|
|
|
|
// ReadYAMLFile reads YAML-formatted configuration file and
|
|
// de-serializes it to a given object
|
|
func ReadYAMLFile(filePath string, cfg interface{}) error {
|
|
data, err := ioutil.ReadFile(filePath)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return yaml.Unmarshal(data, cfg)
|
|
}
|