github.com/kubeshop/testkube@v1.17.23/pkg/api/v1/testkube/model_template_extended.go (about) 1 /* 2 * Testkube API 3 * 4 * Testkube provides a Kubernetes-native framework for test definition, execution and results 5 * 6 * API version: 1.0.0 7 * Contact: testkube@kubeshop.io 8 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) 9 */ 10 package testkube 11 12 type Templates []Template 13 14 func (list Templates) Table() (header []string, output [][]string) { 15 header = []string{"Name", "Type", "Labels"} 16 17 for _, e := range list { 18 templateType := "" 19 if e.Type_ != nil { 20 templateType = string(*e.Type_) 21 } 22 23 output = append(output, []string{ 24 e.Name, 25 templateType, 26 MapToString(e.Labels), 27 }) 28 } 29 30 return 31 }