fieldops

package
v0.0.0-...-b05fda7 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package fieldops implements morph FieldMappers that set appropriate Comparer, Copier, and Orderer expressions on morph Fields.

These expressions are used to implement custom equality, copies, and sorting orders in code generated by morph.Comparer, morph.Copier, and morph.Orderer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringsEqualFold

func StringsEqualFold(in morph.Field, emit func(out morph.Field))

StringsEqualFold is a morph.FieldMapper that sets comparer expressions on strings to use strings.EqualFold to perform a case-insensitive comparison using simple Unicode case-folding.

For more advanced folding, use something like github.com/tawesoft/golib/v2/text/fold.

func Time

func Time(in morph.Field, emit func(out morph.Field))

Time is a morph.FieldMapper[ that sets appropriate expressions on fields of type time.Time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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