Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomMask ¶ added in v0.2.0
type CustomMask struct { Reg *regexp.Regexp Handler MaskHandler }
type Mask ¶
type Mask struct { NotMaskReg *regexp.Regexp Reg *regexp.Regexp MaxLength int CustomMasks []*CustomMask }
func New ¶
func New(opts ...MaskOption) *Mask
type MaskHandler ¶ added in v0.2.0
type MaskOption ¶
type MaskOption func(*Mask)
func CustomMaskOption ¶ added in v0.2.0
func CustomMaskOption(reg *regexp.Regexp, handler MaskHandler) MaskOption
CustomMaskOption add custom mask regexp option
func MaxLengthOption ¶
func MaxLengthOption(maxLength int) MaskOption
Set max string length option for mask, if the length of rune is gt max, it will convert to %s ... (%d more runes) 0 means no limit.
func NotMaskRegExpOption ¶ added in v0.1.0
func NotMaskRegExpOption(reg *regexp.Regexp) MaskOption
NotMaskRegExpOption sets not mask regexp option
func RegExpOption ¶
func RegExpOption(reg *regexp.Regexp) MaskOption
RegExpOption sets regexp option
Click to show internal directories.
Click to hide internal directories.