Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type StubGenerator ¶
type StubGenerator struct { // Variable map for search&replace inside Text fields or files TemplateVariables map[string]string Image struct { // Background color of generated image BackgroundColor color.RGBA // Font color (for inserted text) FontColor color.RGBA // Font (for inserted text) Font *basicfont.Face // Font line height FontLineHeight int // Number of colors for palette (GIF) NumColors int // Quality (JPG) Quality int // Width of image Width int // Height of image Height int // Lines of text which will be written inside the image Text []string } // Overwrite existing files Overwrite bool // contains filtered or unexported fields }
func (*StubGenerator) Clone ¶
func (config *StubGenerator) Clone() StubGenerator
Clone stub genetator
func (*StubGenerator) Generate ¶
func (config *StubGenerator) Generate(path string) error
generate one stub file, path will specify type and destination
func (*StubGenerator) SetRootPath ¶
func (config *StubGenerator) SetRootPath(path string) error
Set root path of file generation This root path also makes sure that no files are generated outside of this directory