goembed

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPath

func CheckPath(pkgDir, abs string, dirOK map[string]bool) (info fs.FileInfo, rel string, err error)

func FileImportsEmbed

func FileImportsEmbed(file *ast.File) bool

func IsBadName

func IsBadName(name string) bool

func ParseDirective

func ParseDirective(line string) (args string, ok bool)

func ParsePatterns

func ParsePatterns(docs ...*ast.CommentGroup) (patterns []string, hasDirective bool, err error)

func RelPath

func RelPath(pkgDir, abs string) (string, error)

func SplitArgs

func SplitArgs(s string) ([]string, error)

func ValidPattern

func ValidPattern(pattern string) bool

Types

type FileData

type FileData struct {
	Name string
	Data []byte
}

func BuildFSEntries

func BuildFSEntries(files []FileData) []FileData

func ResolvePatterns

func ResolvePatterns(pkgDir string, patterns []string) ([]FileData, error)

type VarData

type VarData struct {
	Files []FileData
}

type VarMap

type VarMap map[string]VarData

func LoadDirectives

func LoadDirectives(fset *token.FileSet, files []*ast.File) (VarMap, error)

Jump to

Keyboard shortcuts

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