1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-12 13:30:26 +00:00
mycorrhiza/help/help.go
Timur Ismagilov b1489cf11f Move the main help page
It was on /help/en/index, now it is on both /help/en and /help
2021-07-12 15:01:53 +05:00

19 lines
409 B
Go

// Package help contains help messages and the utilities for retrieving them.
package help
import (
"embed"
)
//go:embed en en.myco
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")
}