v2.0.4
What's Changed
- Added Fig Flesh logic and bumped to v2.0.4 by @andreimerlescu in #3
- String
-
figs.WithValidator(aString, figtree.AssureStringNoPrefix(prefix) -
figs.WithValidator(aString, figtree.AssureStringNoPrefixes([]string of prefixes) -
figs.WithValidator(aString, figtree.AssureStringNoSuffix(suffix) -
figs.WithValidator(aString, figtree.AssureStringNoSuffixes([]string of suffix) -
figs.WithValidator(aString, figtree.AssureStringNoPrefix(prefix) -
figs.WithValidator(aString, figtree.AssureStringNoSuffix(suffix) -
figs.WithValidator(aString, figtree.AssureStringHasPrefixes([]string of prefixes) -
figs.WithValidator(aString, figtree.AssureStringHasSuffixes([]string of suffix) -
figs.WithValidator(aString, figtree.AssureStringNoPrefixes([]string of prefixes) -
figs.WithValidator(aString, figtree.AssureStringNoSuffixes([]string of suffix)
-
- List
-
figs.ListValues() []string
-
- Map
-
figs.MapKeys() []string
-
- Callbacks
-
figs.WithCallback(key, figtree.CallbackBeforeVerify, func(value interface{}) error {})(before verify, run this) -
figs.WithCallback(key, figtree.CallbackBeforeChange, func(value interface{}) error {})(before change, run this) -
figs.WithCallback(key, figtree.CallbackBeforeRead, func(value interface{}) error {})(before read, run this)
-
- Rules
-
figs.WithRule(key, figtree.RulePreventChange)(if property is changed, block the attempt) -
figs.WithRule(key, figtree.RulePanicOnChange)(callpanic()when value changes) -
figs.WithRule(key, figtree.RuleNoVerify)(disable verification on rule))
-
- Persistence
-
figs.SaveTo(path)(saves the fruit to a file) -
figs.ReadFrom(path)(loads fruit from a file)
-
Full Changelog: v2.0.3...v2.0.4