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