Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FS embed.FS // assigned Top string // path to top directory (ex: files) )
set from init by importers, but also changeable at runtime
View Source
var Cmd = &Z.Cmd{ Name: `emb`, Summary: `access embedded files`, Version: `v0.0.1`, Copyright: `Copyright 2021 Robert S Muhlestein`, License: `Apache-2.0`, Source: `git@github.com:rwxrob/emb.git`, Issues: `github.com/rwxrob/emb/issues`, Init: func(x *Z.Cmd, args ...string) error { var zero embed.FS switch { case FS == zero: return MissingFS{} case Top == "": return MissingTop{} } return nil }, Commands: []*Z.Cmd{help.Cmd, catCmd, listCmd}, Dynamic: template.FuncMap{ `list`: func() string { return strings.Join(RelPaths(), "\n") }, }, Description: ` The **{{.Name}}** command provides access to files embedded within this binary: {{ list }} `, }
Functions ¶
Types ¶
type MissingTop ¶
type MissingTop struct{}
func (MissingTop) Error ¶
func (e MissingTop) Error() string
Click to show internal directories.
Click to hide internal directories.