getStorageType should return valid results

This commit is contained in:
Harshavardhana 2015-01-29 01:08:54 -08:00
parent 93b47bc097
commit 8391a6e17a

View File

@ -61,14 +61,14 @@ func main() {
func getStorageType(input string) server.StorageType {
switch {
case input == "file":
return server.InMemoryStorage
return server.FileStorage
case input == "inmemory":
return server.InMemoryStorage
default:
{
log.Fatal("Unknown server type:", input)
// needed for compile, should never return after fatal log msg
return server.InMemoryStorage
log.Println("Unknown storage type:", input)
log.Println("Choosing default storage type as 'file'..")
return server.FileStorage
}
}
}