优化结构
This commit is contained in:
@@ -36,12 +36,6 @@ func (r *Registry) Register(method Method) {
|
||||
r.methods[method.Name] = method
|
||||
}
|
||||
|
||||
func (r *Registry) RegisterAll(methods []Method) {
|
||||
for _, method := range methods {
|
||||
r.Register(method)
|
||||
}
|
||||
}
|
||||
|
||||
func (r *Registry) Lookup(name string) (MethodFunc, bool) {
|
||||
if r == nil {
|
||||
return nil, false
|
||||
|
||||
Reference in New Issue
Block a user