modifiers

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default added in v3.1.0

func Default(ctx context.Context, t *mold.Transformer, v reflect.Value, param string) error

Default allows setting of a default value IF no value is already present.

func New

func New() *mold.Transformer

New returns a modifier with defaults registered

func SnakeCase

func SnakeCase(ctx context.Context, t *mold.Transformer, v reflect.Value, param string) error

SnakeCase converts string to snake case

func ToLower

func ToLower(ctx context.Context, t *mold.Transformer, v reflect.Value, param string) error

ToLower convert string to lower case

func ToUpper

func ToUpper(ctx context.Context, t *mold.Transformer, v reflect.Value, param string) error

ToUpper convert string to upper case

func TrimLeft

func TrimLeft(ctx context.Context, t *mold.Transformer, v reflect.Value, param string) error

TrimLeft trims extra left hand side of string using provided cutset

func TrimPrefix

func TrimPrefix(ctx context.Context, t *mold.Transformer, v reflect.Value, param string) error

TrimPrefix trims the string of a prefix

func TrimRight

func TrimRight(ctx context.Context, t *mold.Transformer, v reflect.Value, param string) error

TrimRight trims extra right hand side of string using provided cutset

func TrimSpace

func TrimSpace(ctx context.Context, t *mold.Transformer, v reflect.Value, param string) error

TrimSpace trims extra space from text

func TrimSuffix

func TrimSuffix(ctx context.Context, t *mold.Transformer, v reflect.Value, param string) error

TrimSuffix trims the string of a suffix

Types

This section is empty.

Jump to

Keyboard shortcuts

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