Version: v0.2.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2019 License: MIT Imports: 16 Imported by: 48



Package embed implements all file embedding logic for github.com/mjibson/esc.



This section is empty.


This section is empty.


func Run

func Run(conf *Config, out io.Writer) error

Run executes a Config.


type Config

type Config struct {
	// OutputFile is the file name to write output, else stdout.
	OutputFile string
	// Package name for the generated file.
	Package string
	// Prefix is stripped from filenames.
	Prefix string
	// Ignore is the regexp for files we should ignore (for example `\.DS_Store`).
	Ignore string
	// Include is the regexp for files to include. If provided, only files that
	// match will be included.
	Include string
	// ModTime is the Unix timestamp to override as modification time for all files.
	ModTime string
	// Private, if true, causes autogenerated functions to be unexported.
	Private bool
	// NoCompression, if true, stores the files without compression.
	NoCompression bool
	// Invocation, if set, is added to the invocation string in the generated template.
	Invocation string

	// Files is the list of files or directories to embed.
	Files []string

Config contains all information needed to run esc.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL