Rename storage type inmemory to memory
This is technically a breaking change, but given how long ago this field was implemented as well as the fact that this is the default value if the type is not specified, I doubt anybody's explicitly setting it as inmemory
This commit is contained in:
@ -57,7 +57,7 @@ func Initialize(cfg *Config) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
case TypeInMemory:
|
||||
case TypeMemory:
|
||||
fallthrough
|
||||
default:
|
||||
if len(cfg.File) > 0 {
|
||||
|
@ -32,13 +32,13 @@ func TestInitialize(t *testing.T) {
|
||||
ExpectedErr: nil,
|
||||
},
|
||||
{
|
||||
Name: "inmemory-no-file",
|
||||
Cfg: &Config{Type: TypeInMemory},
|
||||
Name: "memory-no-file",
|
||||
Cfg: &Config{Type: TypeMemory},
|
||||
ExpectedErr: nil,
|
||||
},
|
||||
{
|
||||
Name: "inmemory-with-file",
|
||||
Cfg: &Config{Type: TypeInMemory, File: t.TempDir() + "/TestInitialize_inmemory-with-file.db"},
|
||||
Name: "memory-with-file",
|
||||
Cfg: &Config{Type: TypeMemory, File: t.TempDir() + "/TestInitialize_memory-with-file.db"},
|
||||
ExpectedErr: nil,
|
||||
},
|
||||
{
|
||||
|
@ -4,6 +4,6 @@ package storage
|
||||
type Type string
|
||||
|
||||
const (
|
||||
TypeInMemory Type = "inmemory" // In-memory store
|
||||
TypeSQLite Type = "sqlite" // SQLite store
|
||||
TypeMemory Type = "memory" // In-memory store
|
||||
TypeSQLite Type = "sqlite" // SQLite store
|
||||
)
|
||||
|
Reference in New Issue
Block a user