naming

package
v0.37.6 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capitalize

func Capitalize(s string) string

func DeriveTableName

func DeriveTableName(resourceName string) string

DeriveTableName converts a CamelCase resource name into a snake_case plural table name.

func ToCamelCase

func ToCamelCase(s string) string

ToCamelCase converts a snake_case identifier into camelCase. Examples: "admin_users" -> "adminUsers", "product_categories" -> "productCategories"

func ToLowerCamelCase

func ToLowerCamelCase(s string) string

ToLowerCamelCase converts a PascalCase identifier into camelCase by lowercasing the first character. Examples: "NewUser" -> "newUser", "AdminUser" -> "adminUser", "User" -> "user"

func ToSnakeCase

func ToSnakeCase(s string) string

ToSnakeCase converts a CamelCase identifier into snake_case.

Types

This section is empty.

Jump to

Keyboard shortcuts

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