MCPcopy Index your code
hub / github.com/oapi-codegen/oapi-codegen / isValidRuneForGoID

Function isValidRuneForGoID

pkg/codegen/utils.go:734–740  ·  view source on GitHub ↗
(index int, char rune)

Source from the content-addressed store, hash-verified

732}
733
734func isValidRuneForGoID(index int, char rune) bool {
735 if index == 0 && unicode.IsNumber(char) {
736 return false
737 }
738
739 return unicode.IsLetter(char) || char == '_' || unicode.IsNumber(char)
740}
741
742// IsValidGoIdentity checks if the given string can be used as a
743// name of variable, constant, or type.

Callers 2

IsGoIdentityFunction · 0.85
SanitizeGoIdentifierFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected