transform

package
v1.0.44 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTypeDecl

func GetTypeDecl(decls []ast.Decl, name string) *ast.TypeSpec

Types

type File

type File struct {
	Code    []byte
	Ast     *ast.File
	AbsFile string
	Fset    *token.FileSet
}

func Parse

func Parse(file string) (*File, error)

func (*File) GetCode

func (c *File) GetCode(node ast.Node) []byte

func (*File) GetCodeSlice

func (c *File) GetCodeSlice(start token.Pos, end token.Pos) []byte

func (*File) GetFuncDecl

func (c *File) GetFuncDecl(name string) *ast.FuncDecl

func (*File) GetMethodDecl

func (c *File) GetMethodDecl(typeName string, name string) *ast.FuncDecl

func (*File) GetTypeDecl

func (c *File) GetTypeDecl(name string) *ast.TypeSpec

Jump to

Keyboard shortcuts

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