StoreForFormat returns the correct format-specific implementation of the Store interface given the format.
(format Format, c *config.StoresConfig)
| 172 | // StoreForFormat returns the correct format-specific implementation |
| 173 | // of the Store interface given the format. |
| 174 | func StoreForFormat(format Format, c *config.StoresConfig) Store { |
| 175 | storeConst, found := storeConstructors[format] |
| 176 | if !found { |
| 177 | storeConst = storeConstructors[Binary] // default |
| 178 | } |
| 179 | return storeConst(c) |
| 180 | } |
| 181 | |
| 182 | // DefaultStoreForPath returns the correct format-specific implementation |
| 183 | // of the Store interface given the path to a file |
no outgoing calls
no test coverage detected