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

Function compactAttrs

internal/estimate/estimator.go:591–610  ·  view source on GitHub ↗
(attrs map[string]string)

Source from the content-addressed store, hash-verified

589}
590
591func compactAttrs(attrs map[string]string) map[string]string {
592 if len(attrs) == 0 {
593 return nil
594 }
595
596 compacted := make(map[string]string)
597 for key, value := range attrs {
598 trimmed := strings.TrimSpace(value)
599 if trimmed == "" {
600 continue
601 }
602 compacted[key] = trimmed
603 }
604
605 if len(compacted) == 0 {
606 return nil
607 }
608
609 return compacted
610}
611
612func displayProduct(provider, product string) string {
613 switch {

Callers 2

EstimateAllResourcesFunction · 0.85
pricingItemMatchesRecordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected