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