parsedtypes

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	// the identifier of parsed AST
	ID *ast.Ident
	// type of the field
	Type Type
}

Field is a single field of complex structure

type Fields

type Fields []Field

Fields is a list of field Since Field is a node of a list, we handle fields as a whole.

func (*Fields) Format

func (fs *Fields) Format(seperator string) string

func (*Fields) List

func (fs *Fields) List() []string

func (*Fields) Parse

func (fs *Fields) Parse(field *ast.Field)

type Type

type Type struct {
	// package name
	Pkg string
	// selector name
	Key string
	// whether it's a pointer
	Pointer bool
}

Type represent a type of a identifier

func (*Type) Parse

func (t *Type) Parse(expr ast.Expr)

func (*Type) String

func (t *Type) String() string

Jump to

Keyboard shortcuts

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