mirror of
https://github.com/go-gost/gost.git
synced 2026-10-09 12:35:45 +00:00
add auther api
This commit is contained in:
@@ -19,6 +19,9 @@ type serviceRegistry struct {
|
||||
}
|
||||
|
||||
func (r *serviceRegistry) Register(name string, svc *service.Service) error {
|
||||
if name == "" || svc == nil {
|
||||
return nil
|
||||
}
|
||||
if _, loaded := r.m.LoadOrStore(name, svc); loaded {
|
||||
return ErrDup
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user