MCPcopy Index your code
hub / github.com/gopherdata/gophernotes / File

Function File

display.go:387–393  ·  view source on GitHub ↗
(mimeType string, path string)

Source from the content-addressed store, hash-verified

385}
386
387func File(mimeType string, path string) Data {
388 bytes, err := ioutil.ReadFile(path)
389 if err != nil {
390 panic(err)
391 }
392 return Any(mimeType, bytes)
393}
394
395func HTML(html string) Data {
396 return MakeData(MIMETypeHTML, html)

Callers

nothing calls this directly

Calls 1

AnyFunction · 0.85

Tested by

no test coverage detected