Flipt Condition Operators (flipt/operators.go)

flipt · rpc/flipt/operators.go · go · MIT
dev-tools, analytics, ai, lang:go, tag:operators

Defines standard comparison operators for feature flag targeting and rule evaluation. Reuse when building conditional evaluation engines.

// Source: https://github.com/flipt-io/flipt | License: MIT | Copyright 2025 Flipt Software, Inc
// Provided via justclaw.it.com; keep this notice with the code.
package flipt

const (
	OpEQ          = "eq"
	OpNEQ         = "neq"
	OpLT          = "lt"
	OpLTE         = "lte"
	OpGT          = "gt"
	OpGTE         = "gte"
	OpEmpty       = "empty"
	OpNotEmpty    = "notempty"
	OpTrue        = "true"
	OpFalse       = "false"
	OpPresent     = "present"
	OpNotPresent  = "notpresent"
	OpPrefix      = "prefix"
	OpSuffix      = "suffix"
	OpIsOneOf     = "isoneof"
	OpIsNotOneOf  = "isnotoneof"
	OpContains    = "contains"
	OpNotContains = "notcontains"
)

var (
	ValidOperators = map[string]struct{}{
		OpEQ:          {},
		OpNEQ:         {},
		OpLT:          {},
		OpLTE:         {},
		OpGT:          {},


... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key