parser

package
v0.0.0-...-13edbfa Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParsedStruct

type ParsedStruct struct {
	TypeName string
	Fields   []StructField
	Doc      *ast.CommentGroup // line comments; or nil
}

ParsedStruct represents struct info

type Result

type Result struct {
	Structs     map[string]ParsedStruct
	PackageName string
	Types       *types.Package
}

type StructField

type StructField struct {
	// contains filtered or unexported fields
}

StructField represents one field in struct

func (StructField) Name

func (sf StructField) Name() string

func (StructField) Tag

func (sf StructField) Tag() reflect.StructTag

func (StructField) Type

func (sf StructField) Type() types.Type

type Structs

type Structs struct{}

func (Structs) ParseFile

func (p Structs) ParseFile(ctx context.Context, filePath string) (*Result, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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