MCPcopy Create free account
hub / github.com/Unpackerr/unpackerr / makeCompose

Method makeCompose

init/config/compose.go:64–87  ·  view source on GitHub ↗
(prefix string, bare bool)

Source from the content-addressed store, hash-verified

62}
63
64func (h *Header) makeCompose(prefix string, bare bool) string {
65 var buf bytes.Buffer
66
67 if len(h.Params) > 0 && bare {
68 buf.WriteString("## " + h.Title + "\n")
69 } else if len(h.Params) > 0 {
70 buf.WriteString(space + " ## " + h.Title + "\n")
71 }
72
73 pfx := space + " - "
74 if bare {
75 pfx = ""
76 }
77
78 for _, param := range h.Params {
79 if h.Kind == list {
80 buf.WriteString(param.Compose(pfx + prefix + h.Prefix + "0_"))
81 } else {
82 buf.WriteString(param.Compose(pfx + prefix + h.Prefix))
83 }
84 }
85
86 return buf.String()
87}
88
89func (h *Header) makeComposeDefined(prefix string, defs Defs, order []section, bare bool) string {
90 var buf bytes.Buffer

Callers 3

makeDocsMethod · 0.95
createComposeFunction · 0.80
makeComposeDefinedMethod · 0.80

Calls 2

ComposeMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected