snaker

package module
v0.0.0-...-e648e82 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package snaker provides methods to convert CamelCase to and from snake_case.

snaker takes into takes into consideration common initialisms (ie, ID, HTTP, ACL, etc) when converting to/from CamelCase and snake_case.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddInitialisms

func AddInitialisms(initialisms ...string) error

AddInitialisms adds initialisms to the recognized initialisms.

func CamelToSnake

func CamelToSnake(s string) string

CamelToSnake converts s to snake_case.

func CamelToSnakeIdentifier

func CamelToSnakeIdentifier(s string) string

CamelToSnakeIdentifier converts s to its snake_case identifier.

func ForceCamelIdentifier

func ForceCamelIdentifier(s string) string

ForceCamelIdentifier forces CamelCase specific to Go.

func ForceLowerCamelIdentifier

func ForceLowerCamelIdentifier(s string) string

ForceLowerCamelIdentifier forces the first portion of an identifier to be lower case.

func IsInitialism

func IsInitialism(initialism string) bool

IsInitialism indicates whether or not an initialism is registered as an identified initialism.

func SnakeToCamel

func SnakeToCamel(s string) string

SnakeToCamel converts s to CamelCase.

func SnakeToCamelIdentifier

func SnakeToCamelIdentifier(s string) string

SnakeToCamelIdentifier converts s to its CamelCase identifier (first letter is capitalized).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL