MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / validateOperator

Method validateOperator

reconciliation.go:1254–1260  ·  view source on GitHub ↗

validateOperator checks if the provided operator is valid. Parameters: - operator: The operator to validate. Returns an error if the operator is invalid.

(operator string)

Source from the content-addressed store, hash-verified

1252// - operator: The operator to validate.
1253// Returns an error if the operator is invalid.
1254func (s *LedgerForge) validateOperator(operator string) error {
1255 validOperators := []string{"equals", "greater_than", "less_than", "contains"}
1256 if !contains(validOperators, operator) {
1257 return errors.New("invalid operator")
1258 }
1259 return nil
1260}
1261
1262// validateField checks if the provided field is valid for a matching rule.
1263// Parameters:

Callers 1

validateCriteriaMethod · 0.95

Calls 1

containsFunction · 0.70

Tested by

no test coverage detected