FileExtension returns the file extension (without dot) for the format.
()
| 29 | |
| 30 | // FileExtension returns the file extension (without dot) for the format. |
| 31 | func (f Format) FileExtension() string { |
| 32 | switch f { |
| 33 | case FormatJSON: |
| 34 | return "json" |
| 35 | default: |
| 36 | return "yaml" |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | // otherFormat returns the other supported format. Used by the *Any helpers |
| 41 | // to implement "prefer configured format, fall back to the other" so replay |
no outgoing calls