Use apiextension v1
- upgrade from apiextension v1beta1 to v1 - generate yaml manifest for crd intead of applying it at runtime - users will have to apply the manifest with kubectl - kg and kgctl log an error if the crd is not present - now validation should actually work Signed-off-by: leonnicolas <leonloechner@gmx.de>
This commit is contained in:
34
vendor/github.com/gobuffalo/flect/dasherize.go
generated
vendored
Normal file
34
vendor/github.com/gobuffalo/flect/dasherize.go
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
package flect
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
// Dasherize returns an alphanumeric, lowercased, dashed string
|
||||
// Donald E. Knuth = donald-e-knuth
|
||||
// Test with + sign = test-with-sign
|
||||
// admin/WidgetID = admin-widget-id
|
||||
func Dasherize(s string) string {
|
||||
return New(s).Dasherize().String()
|
||||
}
|
||||
|
||||
// Dasherize returns an alphanumeric, lowercased, dashed string
|
||||
// Donald E. Knuth = donald-e-knuth
|
||||
// Test with + sign = test-with-sign
|
||||
// admin/WidgetID = admin-widget-id
|
||||
func (i Ident) Dasherize() Ident {
|
||||
var parts []string
|
||||
|
||||
for _, part := range i.Parts {
|
||||
var x string
|
||||
for _, c := range part {
|
||||
if unicode.IsLetter(c) || unicode.IsDigit(c) {
|
||||
x += string(c)
|
||||
}
|
||||
}
|
||||
parts = xappend(parts, x)
|
||||
}
|
||||
|
||||
return New(strings.ToLower(strings.Join(parts, "-")))
|
||||
}
|
Reference in New Issue
Block a user