astinspector

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inspector

type Inspector struct {
	FSet *token.FileSet
	File *ast.File
	// contains filtered or unexported fields
}

func NewInspector

func NewInspector(src any) (*Inspector, error)

src = string, []byte, io.Reader

func (*Inspector) DumpFile

func (i *Inspector) DumpFile(w io.Writer)

func (*Inspector) GetStructField

func (i *Inspector) GetStructField(key string) *StructFieldInfo

func (*Inspector) HasExport

func (i *Inspector) HasExport(name string) bool

func (*Inspector) PackageName

func (i *Inspector) PackageName() string

func (*Inspector) Print

func (i *Inspector) Print()

func (*Inspector) Visit

func (i *Inspector) Visit(node ast.Node) ast.Visitor

type StructFieldInfo

type StructFieldInfo struct {
	Struct string
	Field  string
	Type   string

	InnerType string
	Pointer   bool
	Map       bool
	Array     bool
}

Jump to

Keyboard shortcuts

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