tablenamer

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToSnakeCase

func ToSnakeCase(s string) string

ToSnakeCase converts a string to snake case, used for converting struct name to snake_case

Types

type NamerFn

type NamerFn func(string, bool) string

NamerFn function type is used set table naming function to build table name from struct's name

func Plural

func Plural() NamerFn

Plural builds table name as plural form of struct's name

func Same

func Same() NamerFn

Same builds table name same as struct's name

func Snake

func Snake() NamerFn

Snake builds table name from struct's name in snake format

func SnakePlural

func SnakePlural() NamerFn

SnakePlural builds table name from struct's name in plural snake format

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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