- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for CamelCaseToKebabCase (0.25 sec)
-
pkg/util/strcase/camelcase.go
func CamelCaseWithSeparator(n string, sep string) string { p := strings.Split(n, sep) for i := 0; i < len(p); i++ { p[i] = CamelCase(p[i]) } return strings.Join(p, "") } // CamelCaseToKebabCase converts "MyName" to "my-name" func CamelCaseToKebabCase(s string) string { switch s { case "HTTPAPISpec": return "http-api-spec" case "HTTPRoute": return "http-route" case "HTTPAPISpecBinding": return "http-api-spec-binding"
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Feb 28 19:48:10 UTC 2020 - 2.7K bytes - Viewed (0) -
pkg/util/strcase/camelcase_test.go
"HTTPAPISpec": "http-api-spec", "HTTPAPISpecBinding": "http-api-spec-binding", } for k, v := range cases { t.Run(k, func(t *testing.T) { g := NewWithT(t) a := CamelCaseToKebabCase(k) g.Expect(a).To(Equal(v)) }) } } func TestCamelCaseWithSeparator(t *testing.T) { type args struct { n string sep string } tests := []struct { name string args args
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 31 14:48:28 UTC 2023 - 3.8K bytes - Viewed (0) -
pilot/pkg/networking/util/util.go
FilterMetadata: map[string]*structpb.Struct{}, } } s := "/apis/" + config.GroupVersionKind.Group + "/" + config.GroupVersionKind.Version + "/namespaces/" + config.Namespace + "/" + strcase.CamelCaseToKebabCase(config.GroupVersionKind.Kind) + "/" + config.Name if _, ok := metadata.FilterMetadata[IstioMetadataKey]; !ok { metadata.FilterMetadata[IstioMetadataKey] = &structpb.Struct{ Fields: map[string]*structpb.Value{},
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 13 01:56:28 UTC 2024 - 28.5K bytes - Viewed (0)