9 //go:generate go run syntax/make_headers.go syntax
11 //go:embed colorschemes help plugins syntax
14 func fixPath(name string) string {
15 return strings.TrimLeft(filepath.ToSlash(name), "runtime/")
18 // AssetDir lists file names in folder
19 func AssetDir(name string) ([]string, error) {
21 entries, err := runtime.ReadDir(name)
25 names := make([]string, len(entries), len(entries))
26 for i, entry := range entries {
27 names[i] = entry.Name()
32 // Asset returns a file content
33 func Asset(name string) ([]byte, error) {
35 return runtime.ReadFile(name)