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

Function IsPredeclaredGoIdentifier

pkg/codegen/utils.go:715–718  ·  view source on GitHub ↗

IsPredeclaredGoIdentifier returns whether the given string is a predefined go identifier. See https://golang.org/ref/spec#Predeclared_identifiers

(str string)

Source from the content-addressed store, hash-verified

713//
714// See https://golang.org/ref/spec#Predeclared_identifiers
715func IsPredeclaredGoIdentifier(str string) bool {
716 _, exists := predeclaredSet[str]
717 return exists
718}
719
720// IsGoIdentity checks if the given string can be used as an identity
721// in the generated code like a type name or constant name.

Callers 2

IsValidGoIdentityFunction · 0.85
SanitizeGoIdentityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected