WithToolsExcludeFilter creates a toolset that excludes the specified tools. If no tool names are provided, all tools are included.
(inner tools.ToolSet, toolNames ...string)
| 25 | // WithToolsExcludeFilter creates a toolset that excludes the specified tools. |
| 26 | // If no tool names are provided, all tools are included. |
| 27 | func WithToolsExcludeFilter(inner tools.ToolSet, toolNames ...string) tools.ToolSet { |
| 28 | if len(toolNames) == 0 { |
| 29 | return inner |
| 30 | } |
| 31 | |
| 32 | return &filterTools{ |
| 33 | ToolSet: inner, |
| 34 | toolNames: toolNames, |
| 35 | exclude: true, |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | type filterTools struct { |
| 40 | tools.ToolSet |