Documentation ¶
Overview ¶
Package ident provides functions for parsing and converting identifier names between various naming convention. It has support for MixedCaps, lowerCamelCase, and SCREAMING_SNAKE_CASE naming conventions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Name ¶
type Name []string
Name is an identifier name, broken up into individual words.
func ParseLowerCamelCase ¶
ParseLowerCamelCase parses a lowerCamelCase identifier name.
E.g., "clientMutationId" -> {"client", "Mutation", "Id"}.
func ParseMixedCaps ¶
ParseMixedCaps parses a MixedCaps identifier name.
E.g., "ClientMutationID" -> {"Client", "Mutation", "ID"}.
func ParseScreamingSnakeCase ¶
ParseScreamingSnakeCase parses a SCREAMING_SNAKE_CASE identifier name.
E.g., "CLIENT_MUTATION_ID" -> {"CLIENT", "MUTATION", "ID"}.
func (Name) ToLowerCamelCase ¶
ToLowerCamelCase expresses identifer name in lowerCamelCase naming convention.
E.g., "clientMutationId".
func (Name) ToMixedCaps ¶
ToMixedCaps expresses identifer name in MixedCaps naming convention.
E.g., "ClientMutationID".