cleanTools trims whitespace and removes duplicates from tool names. Empty strings after trimming are excluded.
(tools []string)
| 186 | // cleanTools trims whitespace and removes duplicates from tool names. |
| 187 | // Empty strings after trimming are excluded. |
| 188 | func cleanTools(tools []string) []string { |
| 189 | seen := make(map[string]bool) |
| 190 | var cleaned []string |
| 191 | for _, name := range tools { |
| 192 | trimmed := strings.TrimSpace(name) |
| 193 | if trimmed == "" { |
| 194 | continue |
| 195 | } |
| 196 | if !seen[trimmed] { |
| 197 | seen[trimmed] = true |
| 198 | cleaned = append(cleaned, trimmed) |
| 199 | } |
| 200 | } |
| 201 | return cleaned |
| 202 | } |
| 203 | |
| 204 | // Build creates the final Inventory with all configuration applied. |
| 205 | // This processes toolset filtering, tool name resolution, and sets up |
no outgoing calls
no test coverage detected