MCPcopy
hub / github.com/cloudfoundry/cli / WriteManifest

Function WriteManifest

integration/helpers/app.go:267–272  ·  view source on GitHub ↗

WriteManifest will write out a YAML manifest file at the specified path.

(path string, manifest map[string]interface{})

Source from the content-addressed store, hash-verified

265
266// WriteManifest will write out a YAML manifest file at the specified path.
267func WriteManifest(path string, manifest map[string]interface{}) {
268 body, err := yaml.Marshal(manifest)
269 Expect(err).ToNot(HaveOccurred())
270 err = os.WriteFile(path, body, 0666)
271 Expect(err).ToNot(HaveOccurred())
272}
273
274func ReadManifest(path string) map[string]interface{} {
275 manifestBytes, err := os.ReadFile(path)

Calls

no outgoing calls

Tested by

no test coverage detected