()
| 220 | } |
| 221 | |
| 222 | func ExampleInstance_DisplayOutput_json() { |
| 223 | instance := &Instance{ |
| 224 | TargetVersions: map[string]string{ |
| 225 | "foo": "v1.16.0", |
| 226 | }, |
| 227 | Outputs: []*Output{ |
| 228 | testOutput1, |
| 229 | testOutput2, |
| 230 | }, |
| 231 | OutputFormat: "json", |
| 232 | Components: []string{"foo"}, |
| 233 | } |
| 234 | _ = instance.DisplayOutput() |
| 235 | |
| 236 | // Output: |
| 237 | // {"items":[{"name":"some name one","filePath":"path-to-file","namespace":"pluto-namespace","api":{"version":"extensions/v1beta1","kind":"Deployment","deprecated-in":"v1.9.0","removed-in":"v1.16.0","replacement-api":"apps/v1","replacement-available-in":"v1.10.0","component":"foo"},"deprecated":true,"removed":true,"replacementAvailable":true},{"name":"some name two","api":{"version":"extensions/v1beta1","kind":"Deployment","deprecated-in":"v1.9.0","removed-in":"v1.16.0","replacement-api":"apps/v1","replacement-available-in":"v1.10.0","component":"foo"},"deprecated":true,"removed":true,"replacementAvailable":true}],"target-versions":{"foo":"v1.16.0"}} |
| 238 | } |
| 239 | |
| 240 | func ExampleInstance_DisplayOutput_yaml() { |
| 241 | instance := &Instance{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…