NormalizeInventoryFormat validates and canonicalizes inventory format.
(format string)
| 323 | |
| 324 | // NormalizeInventoryFormat validates and canonicalizes inventory format. |
| 325 | func NormalizeInventoryFormat(format string) string { |
| 326 | switch strings.ToLower(strings.TrimSpace(format)) { |
| 327 | case InventoryFormatINI: |
| 328 | return InventoryFormatINI |
| 329 | case InventoryFormatYAML: |
| 330 | return InventoryFormatYAML |
| 331 | default: |
| 332 | return InventoryFormatYAML |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | // NormalizeInventoryStyle validates and canonicalizes inventory style. |
| 337 | func NormalizeInventoryStyle(style string) string { |
no outgoing calls