LoadObject loads the YAML spec into obj
(filename string, obj client.Object)
| 107 | |
| 108 | // LoadObject loads the YAML spec into obj |
| 109 | func LoadObject(filename string, obj client.Object) client.Object { |
| 110 | bytes, err := ioutil.ReadFile(filename) |
| 111 | if err != nil { |
| 112 | panic(err) |
| 113 | } |
| 114 | if err := yaml.Unmarshal(bytes, obj); err != nil { |
| 115 | panic(err) |
| 116 | } |
| 117 | return obj |
| 118 | } |
no outgoing calls
no test coverage detected