Register spec types in client
Allow types to be registred multiple times instead of panic. Fixes #1235 Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -26,7 +26,7 @@ func Register(v interface{}, args ...string) {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
if _, ok := registry[t]; ok {
|
||||
panic(errdefs.ErrAlreadyExists)
|
||||
return
|
||||
}
|
||||
registry[t] = path.Join(append([]string{Prefix}, args...)...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user