1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 03:36:16 +00:00
mycorrhiza/help/help.go
Umar Getagazov 97df77d158 go fmt
2022-09-14 10:39:37 +03:00

20 lines
415 B
Go

// Package help contains help messages and the utilities for retrieving them.
package help
import (
"embed"
)
//go:embed en en.myco *.html
var fs embed.FS
// Get determines what help text you need and returns it. The path is a substring from URL, it follows this form:
//
// <language>/<topic>
func Get(path string) ([]byte, error) {
if path == "" {
return Get("en")
}
return fs.ReadFile(path + ".myco")
}