(tool Tool)
| 29 | } |
| 30 | |
| 31 | func (r *ToolRegistry) Register(tool Tool) { |
| 32 | if tool == nil { |
| 33 | return |
| 34 | } |
| 35 | if tool.ShouldDefer() { |
| 36 | r.deferred.Add(tool) |
| 37 | return |
| 38 | } |
| 39 | r.registerActive(tool, tool.Name()) |
| 40 | } |
| 41 | |
| 42 | func (r *ToolRegistry) Get(name string) Tool { |
| 43 | if tool, ok := r.tools[name]; ok { |