(i *inventory.Inventory)
| 148 | } |
| 149 | |
| 150 | func generateToolsetsDoc(i *inventory.Inventory) string { |
| 151 | var buf strings.Builder |
| 152 | |
| 153 | // Add table header and separator (with icon column) |
| 154 | buf.WriteString("| | Toolset | Description |\n") |
| 155 | buf.WriteString("| --- | ----------------------- | ------------------------------------------------------------- |\n") |
| 156 | |
| 157 | // Add the context toolset row with custom description (strongly recommended) |
| 158 | // Get context toolset for its icon |
| 159 | contextIcon := octiconImg("person") |
| 160 | fmt.Fprintf(&buf, "| %s | `context` | **Strongly recommended**: Tools that provide context about the current user and GitHub context you are operating in |\n", contextIcon) |
| 161 | |
| 162 | // AvailableToolsets() returns toolsets that have tools, sorted by ID |
| 163 | // Exclude context (custom description above) |
| 164 | for _, ts := range i.AvailableToolsets("context") { |
| 165 | icon := octiconImg(ts.Icon) |
| 166 | fmt.Fprintf(&buf, "| %s | `%s` | %s |\n", icon, ts.ID, ts.Description) |
| 167 | } |
| 168 | |
| 169 | return strings.TrimSuffix(buf.String(), "\n") |
| 170 | } |
| 171 | |
| 172 | func generateToolsDoc(r *inventory.Inventory) string { |
| 173 | tools := r.ToolsForRegistration(context.Background()) |
no test coverage detected