MCPcopy Index your code
hub / github.com/cli/cli / formatRetentionPeriodDays

Function formatRetentionPeriodDays

pkg/cmd/codespace/view.go:124–134  ·  view source on GitHub ↗
(codespace codespace)

Source from the content-addressed store, hash-verified

122}
123
124func formatRetentionPeriodDays(codespace codespace) string {
125 days := codespace.RetentionPeriodMinutes / minutesInDay
126 // Don't display the retention period if it is 0 days
127 if days == 0 {
128 return ""
129 } else if days == 1 {
130 return "1 day"
131 }
132
133 return fmt.Sprintf("%d days", days)
134}

Callers 1

ViewCodespaceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected