MCPcopy Index your code
hub / github.com/docker/docker-agent / WithToolsFilter

Function WithToolsFilter

pkg/teamloader/filter.go:13–23  ·  view source on GitHub ↗

WithToolsFilter creates a toolset that only includes the specified tools. If no tool names are provided, all tools are included.

(inner tools.ToolSet, toolNames ...string)

Source from the content-addressed store, hash-verified

11// WithToolsFilter creates a toolset that only includes the specified tools.
12// If no tool names are provided, all tools are included.
13func WithToolsFilter(inner tools.ToolSet, toolNames ...string) tools.ToolSet {
14 if len(toolNames) == 0 {
15 return inner
16 }
17
18 return &filterTools{
19 ToolSet: inner,
20 toolNames: toolNames,
21 exclude: false,
22 }
23}
24
25// WithToolsExcludeFilter creates a toolset that excludes the specified tools.
26// If no tool names are provided, all tools are included.

Calls

no outgoing calls