MCPcopy Index your code
hub / github.com/composable-operator/composable / LoadObject

Function LoadObject

controllers/test/template.go:109–118  ·  view source on GitHub ↗

LoadObject loads the YAML spec into obj

(filename string, obj client.Object)

Source from the content-addressed store, hash-verified

107
108// LoadObject loads the YAML spec into obj
109func 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}

Callers 2

LoadComposableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected