embed

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(files []string, root string, tmpl string) ([]byte, error)

Generate embedable code from list of files, it returns parsed template and error.

func GenerateEmbed

func GenerateEmbed(files []string, destFile string, pkg string, root string) error

Types

type Embed

type Embed struct {
	Root     string
	Template string
	Funcs    map[string]func(file string, data []byte) string
}

func (Embed) Build

func (e Embed) Build(files []string) ([]byte, error)

Build embed file.

type Item

type Item struct {
	ID   string
	Path string
	Data []byte
}

Jump to

Keyboard shortcuts

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