mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-09-20 04:36:09 +08:00
15 lines
233 B
Go
15 lines
233 B
Go
package driver
|
|
|
|
import (
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
type New func() Driver
|
|
|
|
var driversMap = map[string]New{}
|
|
|
|
func RegisterDriver(name string, new New) {
|
|
log.Infof("register driver: [%s]", name)
|
|
driversMap[name] = new
|
|
}
|