mirror of https://github.com/docker/docs.git
Fix a crash in graphdriver init
This commit is contained in:
parent
77ae9789d3
commit
a63ff8da46
|
@ -36,6 +36,10 @@ var (
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
drivers = make(map[string]InitFunc)
|
||||||
|
}
|
||||||
|
|
||||||
func Register(name string, initFunc InitFunc) error {
|
func Register(name string, initFunc InitFunc) error {
|
||||||
if _, exists := drivers[name]; exists {
|
if _, exists := drivers[name]; exists {
|
||||||
return fmt.Errorf("Name already registered %s", name)
|
return fmt.Errorf("Name already registered %s", name)
|
||||||
|
|
Loading…
Reference in New Issue