name

package
v3.0.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GuessPluralName

func GuessPluralName(name string) string

GuessPluralName attempts to pluralize a noun.

func Hex

func Hex(s string, n int) string

Hex gets the checksum of s, encodes it to hexadecimal and returns the first n characters of that hexadecimal. Warning: runtime error for n > 32 or n < 0.

func Limit

func Limit(s string, count int) string

Limit the length of a string to count characters. If the string's length is greater or equal to count, it will be truncated and a hash will be appended to the end. Warning: runtime error for count <= 5: https://go.dev/play/p/UAbpZIOvIYo

func SafeConcatName

func SafeConcatName(name ...string) string

SafeConcatName concatenates the given strings and ensures the returned name is under 64 characters by cutting the string off at 57 characters and setting the last 6 with an encoded version of the concatenated string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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