MCPcopy Create free account
hub / github.com/zalando/skipper / CopyPredicate

Function CopyPredicate

eskip/copy.go:11–20  ·  view source on GitHub ↗

CopyPredicate creates a copy of the input predicate.

(p *Predicate)

Source from the content-addressed store, hash-verified

9
10// CopyPredicate creates a copy of the input predicate.
11func CopyPredicate(p *Predicate) *Predicate {
12 if p == nil {
13 return nil
14 }
15
16 c := &Predicate{}
17 c.Name = p.Name
18 c.Args = copyArgs(p.Args)
19 return c
20}
21
22// CopyPredicates creates a new slice with the copy of each predicate in the input slice.
23func CopyPredicates(p []*Predicate) []*Predicate {

Callers 2

CopyPredicatesFunction · 0.85
TestCopyFunction · 0.85

Calls 1

copyArgsFunction · 0.85

Tested by 1

TestCopyFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…