templates

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommentBlock

func CommentBlock(str string) string

CommentBlock outputs the string as a comment block, ie prefixing each line with //

func FirstLower

func FirstLower(str string) string

FirstLower sets the first character of the string to lower case

func FirstUpper

func FirstUpper(str string) string

FirstUpper sets the first character of the string to upper case

func RemoveSpecial

func RemoveSpecial(value string) string

RemoveSpecial removes any non-ascii characters from the string

func Ternary added in v2.1.1

func Ternary(vt any, vf any, v bool) any

Ternary returns the first value if the last value is true, otherwise returns the second value.

func ToPascalCase

func ToPascalCase(value string) string

ToPascalCase returns a pascal-cased (e.g. SomeValueLikeThis) out of a string

func ToSnakeCase

func ToSnakeCase(str string) string

ToSnakeCase converts the

func TypeDisplayName

func TypeDisplayName(value string) string

TypeDisplayName returns the value with special characters replaced with there semantic meaning and then converted to pascal case. For example,

*string

becomes

NullableString

Types

This section is empty.

Jump to

Keyboard shortcuts

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