embed

package
v0.0.0-...-d02d248 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package embed implements parsing of embed directives in Go files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteEmbedConfig

func WriteEmbedConfig(files []string, w io.Writer) error

WriteEmbedConfig writes the embed config to w

Types

type Cfg

type Cfg struct {
	Patterns map[string][]string
	Files    map[string]string
}

Cfg is the structure of a Go embedcfg file.

func Parse

func Parse(gofiles []string) (*Cfg, error)

Parse parses the given files and returns the embed information in them.

func (*Cfg) AddPackage

func (cfg *Cfg) AddPackage(pkg *build.Package) error

AddPackage parses a go package and adds any embed patterns to the configuration

Jump to

Keyboard shortcuts

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