1
0
forked from MTSR/mapserver
mapserver/server/playerdb/create.go
2019-01-25 15:02:21 +01:00

16 lines
322 B
Go

package playerdb
import (
"errors"
"mapserver/worldconfig"
)
func Create(cfg *worldconfig.WorldConfig) (DBAccessor, error) {
switch cfg.PlayerBackend {
case worldconfig.BACKEND_FILES:
return &FilePlayerDB{}, nil
default:
return nil, errors.New("player backend not supported: " + worldconfig.BACKEND_FILES)
}
}