formatMarketplaceSource returns a display string for a marketplace source.
(src claudeMarketplaceSource)
| 133 | |
| 134 | // formatMarketplaceSource returns a display string for a marketplace source. |
| 135 | func formatMarketplaceSource(src claudeMarketplaceSource) string { |
| 136 | switch src.Source { |
| 137 | case "github": |
| 138 | if src.Repo != "" { |
| 139 | return "GitHub (" + src.Repo + ")" |
| 140 | } |
| 141 | return "GitHub" |
| 142 | case "git": |
| 143 | if src.URL != "" { |
| 144 | s := "Git (" + src.URL |
| 145 | if src.Ref != "" { |
| 146 | s += "@" + src.Ref |
| 147 | } |
| 148 | s += ")" |
| 149 | return s |
| 150 | } |
| 151 | return "Git" |
| 152 | } |
| 153 | return src.Source |
| 154 | } |
| 155 | |
| 156 | // ---------- file readers ----------------------------------------------------- |
| 157 |