NormalizeExportFormat returns the normalized string for the export format if it is valid, an empty string otherwise.
(format string)
| 1068 | // NormalizeExportFormat returns the normalized string for the export format if it is valid, an |
| 1069 | // empty string otherwise. |
| 1070 | func NormalizeExportFormat(format string) string { |
| 1071 | format = strings.ToLower(format) |
| 1072 | if _, ok := exportFormats[format]; ok { |
| 1073 | return format |
| 1074 | } |
| 1075 | return "" |
| 1076 | } |