FormatForPathOrString returns the correct format-specific implementation of the Store interface given the formatString if specified, or the path to a file. This is to support the cli, where both are provided.
(path, format string)
| 70 | // of the Store interface given the formatString if specified, or the path to a file. |
| 71 | // This is to support the cli, where both are provided. |
| 72 | func FormatForPathOrString(path, format string) Format { |
| 73 | formatFmt, found := stringToFormat[format] |
| 74 | if !found { |
| 75 | formatFmt = FormatForPath(path) |
| 76 | } |
| 77 | return formatFmt |
| 78 | } |
searching dependent graphs…