(o *obj, fields ...string)
| 89 | } |
| 90 | |
| 91 | func nestedFieldNoCopy[T any](o *obj, fields ...string) T { |
| 92 | value, found, err := unstructured.NestedFieldNoCopy(*o, fields...) |
| 93 | if !found { |
| 94 | panic(fmt.Sprintf("failed to find field %v", fields)) |
| 95 | } |
| 96 | if err != nil { |
| 97 | panic(err.Error()) |
| 98 | } |
| 99 | return value.(T) |
| 100 | } |
| 101 | |
| 102 | func (o *obj) WriteYaml(filename string) error { |
| 103 | data, err := yaml.Marshal(o) |
no test coverage detected