Document possible values of schema fields (#455)

* Document possible values of schema fields

* Change from possible to supported
This commit is contained in:
João Palet 2024-07-09 13:14:38 +01:00 committed by GitHub
parent 846a2ba181
commit 3fb28d1248
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 76 additions and 15 deletions

View file

@ -76,3 +76,17 @@ func SimplifyBackupSchedule(schedule string) string {
})
return simplifiedSchedule
}
func SupportedValuesDocumentation(values []string) string {
if len(values) == 0 {
return ""
}
return "Supported values are: " + strings.Join(quoteValues(values), ", ") + "."
}
func quoteValues(values []string) []string {
for i, value := range values {
values[i] = fmt.Sprintf("`%s`", value)
}
return values
}