Skip to content

v2.0.4

Choose a tag to compare

@andreimerlescu andreimerlescu released this 22 Apr 22:02
· 38 commits to main since this release
1f8fa96

What's Changed

  • 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) (call panic() 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