MCPcopy Index your code
hub / github.com/box-cli-maker/box-cli-maker / MustRender

Method MustRender

box.go:231–237  ·  view source on GitHub ↗

MustRender is like Render but panics if an error occurs. Use MustRender in examples or CLIs where failures should abort execution instead of being handled explicitly.

(title, content string)

Source from the content-addressed store, hash-verified

229// Use MustRender in examples or CLIs where failures should abort execution
230// instead of being handled explicitly.
231func (b *Box) MustRender(title, content string) string {
232 s, err := b.Render(title, content)
233 if err != nil {
234 panic(err)
235 }
236 return s
237}
238
239// Render generates the box with the given title and content.
240//

Callers 5

mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 1

RenderMethod · 0.95

Tested by 1