WriteManifest will write out a YAML manifest file at the specified path.
(path string, manifest map[string]interface{})
| 265 | |
| 266 | // WriteManifest will write out a YAML manifest file at the specified path. |
| 267 | func 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 | |
| 274 | func ReadManifest(path string) map[string]interface{} { |
| 275 | manifestBytes, err := os.ReadFile(path) |
no outgoing calls
no test coverage detected