MCPcopy
hub / github.com/gobyexample-cn/gobyexample / mustReadFile

Function mustReadFile

tools/generate.go:62–66  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

60}
61
62func mustReadFile(path string) string {
63 bytes, err := os.ReadFile(path)
64 check(err)
65 return string(bytes)
66}
67
68func markdown(src string) string {
69 return string(blackfriday.Run([]byte(src)))

Callers 4

readLinesFunction · 0.85
renderIndexFunction · 0.85
renderExamplesFunction · 0.85
render404Function · 0.85

Calls 1

checkFunction · 0.70

Tested by

no test coverage detected