go-strcase
go-strcase copied to clipboard
Bug in camel case conversion
Hi! I found a small bug in UpperCamelCase/LowerCamelCase conversion functions when they are applied on a string "XRequestId"
. The second letter (R) is not capitalized after conversion. Here is a code to reproduce:
package main
import (
"fmt"
"github.com/stoewer/go-strcase"
)
func main() {
fmt.Println(strcase.UpperCamelCase("XRequestId"))
fmt.Println(strcase.LowerCamelCase("XRequestId"))
}
Expected output:
XRequestId
xRequestId
What I actually got:
XrequestId
xrequestId
Thanks you @standy66 for the bug report. I'll have a look at it ASAP.