Versions in this module Expand all Collapse all v0 v0.6.0 Dec 7, 2023 v0.5.0 Nov 28, 2023 v0.4.0 Feb 19, 2023 v0.3.5 Nov 7, 2022 v0.3.4 Sep 4, 2022 v0.3.3 Jun 27, 2022 Changes in this version + var CategoryNames = map[Category]string + var OperandMap = map[string]Operand + type Category int + const Few + const Many + const One + const Other + const Two + const Zero + func (cat Category) String() string + type FormFunc func(ops *Operands) Category + type Operand int + const OperandC + const OperandF + const OperandI + const OperandN + const OperandT + const OperandV + const OperandW + func (op Operand) String() string + type Operands struct + C int64 + F int64 + I int64 + N float64 + T int64 + V int64 + W int64 + func MustNewOperands(a interface{}) *Operands + func NewOperands(a interface{}) (*Operands, error) + type RuleSet struct + Categories []Category + FormFunc FormFunc + func ForLanguage(lang language.Tag) (*RuleSet, bool) + func MustParseRules(rules map[Category]string) *RuleSet + func ParseRules(rawRules map[Category]string) (*RuleSet, error) + func (rs *RuleSet) Evaluate(a interface{}) Category