MCPcopy Create free account
hub / github.com/OverloadBlitz/cloudcent-cli / countByProvider

Function countByProvider

internal/tui/views/pricing.go:1065–1074  ·  view source on GitHub ↗
(items []PricingDisplayItem)

Source from the content-addressed store, hash-verified

1063}
1064
1065func countByProvider(items []PricingDisplayItem) map[string]int {
1066 counts := make(map[string]int)
1067 for _, item := range items {
1068 parts := strings.SplitN(item.Product, " ", 2)
1069 if len(parts) > 0 && parts[0] != "" {
1070 counts[strings.ToLower(parts[0])]++
1071 }
1072 }
1073 return counts
1074}
1075
1076func (v *PricingView) renderResults(active bool, minHeight int) string {
1077 isFocused := active && v.ActiveSection == PricingSectionResults

Callers 1

renderResultsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected