Files
terraform-provider-unifi/internal/utils/markdown.go
Mateusz Filipowicz 325d7b7f20 feat: initialize Terraform Plugin Framework (#23)
* feat: initialize Terraform Plugin Framework

* fix docker-compose path for tests

* fix: ensure documentation can be generated with old provider SDK and new plugin framework

* lint
2025-02-24 00:11:41 +01:00

20 lines
382 B
Go

package utils
import "strconv"
func MarkdownValueListInt(values []int) string {
switch {
case len(values) == 0:
return ""
case len(values) == 1:
return "`" + strconv.Itoa(values[0]) + "`"
default:
s := ""
for i := 0; i < len(values)-1; i++ {
s += "`" + strconv.Itoa(values[i]) + "`, "
}
s += " and `" + strconv.Itoa(values[len(values)-1]) + "`"
return s
}
}