MCPcopy Index your code
hub / github.com/coder/coder / displayFeatures

Function displayFeatures

enterprise/cli/features.go:116–129  ·  view source on GitHub ↗

displayFeatures will return a table displaying all features passed in. filterColumns must be a subset of the feature fields and will determine which columns to display

(filterColumns []string, features map[codersdk.FeatureName]codersdk.Feature)

Source from the content-addressed store, hash-verified

114// filterColumns must be a subset of the feature fields and will determine which
115// columns to display
116func displayFeatures(filterColumns []string, features map[codersdk.FeatureName]codersdk.Feature) (string, error) {
117 rows := make([]featureRow, 0, len(features))
118 for name, feat := range features {
119 rows = append(rows, featureRow{
120 Name: name,
121 Entitlement: string(feat.Entitlement),
122 Enabled: feat.Enabled,
123 Limit: feat.Limit,
124 Actual: feat.Actual,
125 })
126 }
127
128 return cliui.DisplayTable(rows, "name", filterColumns)
129}

Callers 1

featuresListMethod · 0.85

Calls 1

DisplayTableFunction · 0.92

Tested by

no test coverage detected