parser

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindEmbedImportName added in v0.3.2

func FindEmbedImportName(file *ast.File) (string, error)

FindEmbedImportName is find embed package import name

Types

type EmbedPatterns

type EmbedPatterns struct {
	Patterns   []string                    // patterns from ast.File
	PatternPos map[string][]token.Position // line information for Patterns
}

EmbedPatterns is go:embed patterns and pos

func ParseEmbed

func ParseEmbed(fset *token.FileSet, files []*ast.File) (*EmbedPatterns, error)

ParseEmbed parser go:embed patterns from files

Jump to

Keyboard shortcuts

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