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

Method Print

eskip/string.go:194–208  ·  view source on GitHub ↗
(prettyPrintInfo PrettyPrintInfo)

Source from the content-addressed store, hash-verified

192}
193
194func (r *Route) Print(prettyPrintInfo PrettyPrintInfo) string {
195 s := []string{r.predicateString()}
196
197 fs := r.filterString(prettyPrintInfo)
198 if fs != "" {
199 s = append(s, fs)
200 }
201
202 s = append(s, r.backendStringQuoted())
203 separator := " -> "
204 if prettyPrintInfo.Pretty {
205 separator = "\n" + prettyPrintInfo.IndentStr + "-> "
206 }
207 return strings.Join(s, separator)
208}
209
210// String is the same as Print but defaulting to pretty=false.
211func String(routes ...*Route) string {

Callers 8

TestPrintLinesFunction · 0.95
StringMethod · 0.95
printToLogFunction · 0.45
testPrintingFunction · 0.45
fprintExpressionFunction · 0.45
fprintDefinitionFunction · 0.45
usageFunction · 0.45
checkPrettyRoutesFunction · 0.45

Calls 4

predicateStringMethod · 0.95
filterStringMethod · 0.95
backendStringQuotedMethod · 0.95
JoinMethod · 0.80

Tested by 3

TestPrintLinesFunction · 0.76
testPrintingFunction · 0.36
checkPrettyRoutesFunction · 0.36