MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / JoinDoc

Function JoinDoc

pkg/util/pretty/util.go:20–29  ·  view source on GitHub ↗

JoinDoc joins Docs d with Doc s.

(s Doc, d ...Doc)

Source from the content-addressed store, hash-verified

18
19// JoinDoc joins Docs d with Doc s.
20func JoinDoc(s Doc, d ...Doc) Doc {
21 switch len(d) {
22 case 0:
23 return Nil
24 case 1:
25 return d[0]
26 default:
27 return Fold(Concat, d[0], s, JoinDoc(s, d[1:]...))
28 }
29}
30
31// JoinNestedRight nests nested with string s.
32// Every item after the first is indented.

Callers 2

docMethod · 0.92
JoinFunction · 0.85

Calls 1

FoldFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…