embed

package
Version: v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

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

Run executes a Config.

Types

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
	// Prefix to add to the filenames on loading them from disks instead of in binary cache.
	LocalPrefixCWD bool
	// 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.

Source Files

Jump to

Keyboard shortcuts

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