parser

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(dir string) (*mapper.PackageConfig, error)

Types

type Field

type Field struct {
	Name string
	Type ast.Expr
}

type Imports

type Imports map[string]string

func NewImports added in v0.0.5

func NewImports() Imports

func (Imports) ParseFile added in v0.0.5

func (m Imports) ParseFile(file *ast.File)

func (Imports) ParseImport added in v0.0.5

func (m Imports) ParseImport(spec *ast.ImportSpec)

func (Imports) ToList added in v0.0.5

func (m Imports) ToList() []string

type Mapper

type Mapper struct {
	Name    string
	From    *Field
	To      *Field
	Builder []ast.Expr
}

type Package added in v0.0.5

type Package struct {
	Name string
	Path string
}

func ParsePackage added in v0.0.5

func ParsePackage(pkg *packages.Package) *Package

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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