MCPcopy Index your code
hub / github.com/commitdev/zero / conditionHandler

Function conditionHandler

internal/init/prompts.go:344–351  ·  view source on GitHub ↗

conditionHandler is a helper that accepts condition config and returns a function that checks if the condition is met

(cond moduleconfig.Condition)

Source from the content-addressed store, hash-verified

342
343// conditionHandler is a helper that accepts condition config and returns a function that checks if the condition is met
344func conditionHandler(cond moduleconfig.Condition) CustomConditionSignature {
345 if cond.Action == "KeyMatchCondition" {
346 return KeyMatchCondition(cond.MatchField, cond.WhenValue)
347 } else {
348 flog.Errorf("Unsupported condition")
349 return nil
350 }
351}
352
353func appendToSet(set []string, toAppend []string) []string {
354 for _, appendee := range toAppend {

Callers 1

paramConditionsMapperFunction · 0.85

Calls 2

ErrorfFunction · 0.92
KeyMatchConditionFunction · 0.85

Tested by

no test coverage detected