- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for HTTPAPISpecBinding (0.17 sec)
-
pkg/util/strcase/camelcase.go
// 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" default: var out bytes.Buffer for i := range s { if 'A' <= s[i] && s[i] <= 'Z' { if i > 0 { out.WriteByte('-') }
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
cases := map[string]string{ "": "", "Foo": "foo", "FooBar": "foo-bar", "foo9bar": "foo9bar", "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)) }) } }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 31 14:48:28 UTC 2023 - 3.8K bytes - Viewed (0)