Refactor kafka to pure Go (franz-go), fix DBC stubs, update Dockerfile
This commit is contained in:
17
pkg/can-go/internal/identifiers/case.go
Normal file
17
pkg/can-go/internal/identifiers/case.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package identifiers
|
||||
|
||||
import "unicode"
|
||||
|
||||
func IsCamelCase(s string) bool {
|
||||
i := 0
|
||||
for _, r := range s {
|
||||
if unicode.IsDigit(r) {
|
||||
continue
|
||||
}
|
||||
if i == 0 && !unicode.IsUpper(r) || !IsAlphaChar(r) && !IsNumChar(r) {
|
||||
return false
|
||||
}
|
||||
i++
|
||||
}
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user