Documentation ¶
Index ¶
- func PackBytes(box string, name string, bb []byte)
- func PackJSONBytes(box string, name string, jbb string) error
- type Box
- func (b Box) Bytes(name string) []byte
- func (b Box) Has(name string) bool
- func (b Box) MustBytes(name string) ([]byte, error)
- func (b Box) MustString(name string) (string, error)
- func (b Box) Open(name string) (http.File, error)
- func (b Box) String(name string) string
- func (b Box) Walk(wf WalkFunc) error
- type File
- type WalkFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Box ¶
type Box struct { Path string // contains filtered or unexported fields }
Box represent a folder on a disk you want to have access to in the built Go binary.
func NewBox ¶
NewBox returns a Box that can be used to retrieve files from either disk or the embedded binary.
func (Box) MustBytes ¶
MustBytes returns either the byte slice of the requested file or an error if it can not be found.
func (Box) MustString ¶
MustString returns either the string of the requested file or an error if it can not be found.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.