parser

package
v0.0.0-...-7f78983 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2017 License: MIT Imports: 10 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 ParsedStructs

type ParsedStructs map[string]ParsedStruct

ParsedStructs is a map from struct type name to list of fields

func GetStructsInFile

func GetStructsInFile(filePath string) (*loader.PackageInfo, ParsedStructs, error)

GetStructsInFile lists all structures in file passed and returns them with all fields

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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