Documentation
¶
Overview ¶
Package noodle helps embedding static assets into go binary, it supports using ignore file
Index ¶
- func CleanLine(line string) string
- func GenerateEmbed(root string) ([]byte, error)
- func LineToPattern(line string) fsutil.IgnorePattern
- func ReadIgnore(reader io.Reader) (*fsutil.Ignores, error)
- func ReadIgnoreFile(path string) (*fsutil.Ignores, error)
- func RegisterEmbedBox(name string, box EmbedBox)
- type EmbedBox
- type EmbedDir
- type EmbedFile
- type FileInfo
- type LocalFs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateEmbed ¶
GenerateEmbed return code without package and the CODE GENERATED header
func LineToPattern ¶
func LineToPattern(line string) fsutil.IgnorePattern
func ReadIgnore ¶
ReadIgnore reads ignore file and change to patterns reading is based on https://github.com/codeskyblue/dockerignore/blob/HEAD/ignore.go#L40
func RegisterEmbedBox ¶
Types ¶
type EmbedBox ¶
type EmbedBox struct {
Dirs map[string]EmbedDir
Data []byte
// contains filtered or unexported fields
}
func GetEmbedBox ¶
func (*EmbedBox) ExtractFiles ¶
type FileInfo ¶
type FileInfo struct {
FileName string
FileSize int64
FileMode os.FileMode
FileModTime time.Time
FileIsDir bool
}
the awkward File* prefix is to export the field but avoid conflict with os.FileInfo interface ...
func NewFileInfo ¶
type LocalFs ¶
type LocalFs struct {
// contains filtered or unexported fields
}
func NewLocal ¶
NewLocal returns a http.FileSystem using local directory, list directory is disabled, it's just a wrap around http.Dir
func NewLocalUnsafe ¶
NewLocalUnsafe allows list directory and use http.Dir directly
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
_examples
|
|
|
embed
command
|
|
|
embed/gen
Code generated by gommon from config/gommon.yml DO NOT EDIT.
|
Code generated by gommon from config/gommon.yml DO NOT EDIT. |
|
embed_by_hand
command
|
|
|
local
command
|
Click to show internal directories.
Click to hide internal directories.