parser

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModulePath

func ModulePath(mod []byte) string

ModulePath returns the module path from the gomod file text. If it cannot find a module path, it returns an empty string. It is tolerant of unrelated problems in the go.mod file.

Types

type EntityMeta

type EntityMeta struct {
	Name      string
	TableName string
	Indexes   []entity.Index
}

type Parser

type Parser struct {
	PkgPath string
	PkgName string
	Metas   []EntityMeta
}

func (*Parser) Parse

func (p *Parser) Parse(fileName string) error

func (*Parser) Visit

func (p *Parser) Visit(n ast.Node) (w ast.Visitor)

Jump to

Keyboard shortcuts

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