godebug

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringifyItem

func StringifyItem(item debug.Item) string

func StringifyItemFull

func StringifyItemFull(item debug.Item) string

Types

type AnnotationOpt added in v1.1.0

type AnnotationOpt struct {
	Type    AnnotationType
	Opt     string
	Comment *ast.Comment // comment node
	Node    ast.Node     // node associated to comment (can be nil)
}

type AnnotationType

type AnnotationType int
const (
	// Order matters, last is the bigger set
	AnnotationTypeNone AnnotationType = iota
	AnnotationTypeOff
	AnnotationTypeBlock
	AnnotationTypeFile
	AnnotationTypeImport  // annotates set of files (importspec)
	AnnotationTypePackage // annotates set of files
	AnnotationTypeModule  // annotates set of packages
)

func AnnotationTypeInString added in v1.1.0

func AnnotationTypeInString(s string) (AnnotationType, string, error)

type Annotator

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

func NewAnnotator

func NewAnnotator(fset *token.FileSet) *Annotator

func (*Annotator) AnnotateAstFile

func (ann *Annotator) AnnotateAstFile(astFile *ast.File)

func (*Annotator) ResArrayType added in v1.3.3

func (ann *Annotator) ResArrayType(ctx *Ctx, at *ast.ArrayType) ast.Expr

func (*Annotator) ResBasicLit added in v1.3.3

func (ann *Annotator) ResBasicLit(ctx *Ctx, bl *ast.BasicLit) ast.Expr

func (*Annotator) ResBinaryExpr added in v1.3.3

func (ann *Annotator) ResBinaryExpr(ctx *Ctx, be *ast.BinaryExpr) ast.Expr

func (*Annotator) ResCallExpr added in v1.3.3

func (ann *Annotator) ResCallExpr(ctx *Ctx, ce *ast.CallExpr) ast.Expr

func (*Annotator) ResChanType added in v1.3.3

func (ann *Annotator) ResChanType(ctx *Ctx, ct *ast.ChanType) ast.Expr

func (*Annotator) ResCompositeLit added in v1.3.3

func (ann *Annotator) ResCompositeLit(ctx *Ctx, cl *ast.CompositeLit) ast.Expr

func (*Annotator) ResFuncLit added in v1.3.3

func (ann *Annotator) ResFuncLit(ctx *Ctx, fl *ast.FuncLit) ast.Expr

func (*Annotator) ResIdent added in v1.3.3

func (ann *Annotator) ResIdent(ctx *Ctx, id *ast.Ident) ast.Expr

func (*Annotator) ResIndexExpr added in v1.3.3

func (ann *Annotator) ResIndexExpr(ctx *Ctx, ie *ast.IndexExpr) ast.Expr

func (*Annotator) ResInterfaceType added in v1.3.3

func (ann *Annotator) ResInterfaceType(ctx *Ctx, it *ast.InterfaceType) ast.Expr

func (*Annotator) ResKeyValueExpr added in v1.3.3

func (ann *Annotator) ResKeyValueExpr(ctx *Ctx, kv *ast.KeyValueExpr) ast.Expr

func (*Annotator) ResMapType added in v1.3.3

func (ann *Annotator) ResMapType(ctx *Ctx, mt *ast.MapType) ast.Expr

func (*Annotator) ResParenExpr added in v1.3.3

func (ann *Annotator) ResParenExpr(ctx *Ctx, pe *ast.ParenExpr) ast.Expr

func (*Annotator) ResSelectorExpr added in v1.3.3

func (ann *Annotator) ResSelectorExpr(ctx *Ctx, se *ast.SelectorExpr) ast.Expr

func (*Annotator) ResSliceExpr added in v1.3.3

func (ann *Annotator) ResSliceExpr(ctx *Ctx, se *ast.SliceExpr) ast.Expr

func (*Annotator) ResStarExpr added in v1.3.3

func (ann *Annotator) ResStarExpr(ctx *Ctx, se *ast.StarExpr) ast.Expr

func (*Annotator) ResTypeAssertExpr added in v1.3.3

func (ann *Annotator) ResTypeAssertExpr(ctx *Ctx, tae *ast.TypeAssertExpr) ast.Expr

func (*Annotator) ResUnaryExpr added in v1.3.3

func (ann *Annotator) ResUnaryExpr(ctx *Ctx, ue *ast.UnaryExpr) ast.Expr

func (*Annotator) VisAssignStmt added in v1.3.3

func (ann *Annotator) VisAssignStmt(ctx *Ctx, as *ast.AssignStmt)

func (*Annotator) VisBlockStmt added in v1.3.3

func (ann *Annotator) VisBlockStmt(ctx *Ctx, bs *ast.BlockStmt)

func (*Annotator) VisBranchStmt added in v1.3.3

func (ann *Annotator) VisBranchStmt(ctx *Ctx, bs *ast.BranchStmt)

func (*Annotator) VisCaseClause added in v1.3.3

func (ann *Annotator) VisCaseClause(ctx *Ctx, cc *ast.CaseClause)

func (*Annotator) VisCommClause added in v1.3.3

func (ann *Annotator) VisCommClause(ctx *Ctx, cc *ast.CommClause)

func (*Annotator) VisDeclStmt added in v1.3.3

func (ann *Annotator) VisDeclStmt(ctx *Ctx, ds *ast.DeclStmt)

func (*Annotator) VisDeferStmt added in v1.3.3

func (ann *Annotator) VisDeferStmt(ctx *Ctx, ds *ast.DeferStmt)

func (*Annotator) VisExprStmt added in v1.3.3

func (ann *Annotator) VisExprStmt(ctx *Ctx, es *ast.ExprStmt)

func (*Annotator) VisFile added in v1.3.3

func (ann *Annotator) VisFile(ctx *Ctx, file *ast.File)

func (*Annotator) VisForStmt added in v1.3.3

func (ann *Annotator) VisForStmt(ctx *Ctx, fs *ast.ForStmt)

func (*Annotator) VisFuncDecl added in v1.3.3

func (ann *Annotator) VisFuncDecl(ctx *Ctx, fd *ast.FuncDecl)

func (*Annotator) VisGenDecl added in v1.3.3

func (ann *Annotator) VisGenDecl(ctx *Ctx, gd *ast.GenDecl)

func (*Annotator) VisGoStmt added in v1.3.3

func (ann *Annotator) VisGoStmt(ctx *Ctx, gs *ast.GoStmt)

func (*Annotator) VisIfStmt added in v1.3.3

func (ann *Annotator) VisIfStmt(ctx *Ctx, is *ast.IfStmt)

func (*Annotator) VisImportSpec added in v1.3.3

func (ann *Annotator) VisImportSpec(ctx *Ctx, is *ast.ImportSpec)

func (*Annotator) VisIncDecStmt added in v1.3.3

func (ann *Annotator) VisIncDecStmt(ctx *Ctx, ids *ast.IncDecStmt)

func (*Annotator) VisLabeledStmt added in v1.3.3

func (ann *Annotator) VisLabeledStmt(ctx *Ctx, ls *ast.LabeledStmt)

func (*Annotator) VisRangeStmt added in v1.3.3

func (ann *Annotator) VisRangeStmt(ctx *Ctx, rs *ast.RangeStmt)

func (*Annotator) VisReturnStmt added in v1.3.3

func (ann *Annotator) VisReturnStmt(ctx *Ctx, rs *ast.ReturnStmt)

func (*Annotator) VisSelectStmt added in v1.3.3

func (ann *Annotator) VisSelectStmt(ctx *Ctx, ss *ast.SelectStmt)

func (*Annotator) VisSendStmt added in v1.3.3

func (ann *Annotator) VisSendStmt(ctx *Ctx, ss *ast.SendStmt)

func (*Annotator) VisSwitchStmt added in v1.3.3

func (ann *Annotator) VisSwitchStmt(ctx *Ctx, ss *ast.SwitchStmt)

func (*Annotator) VisTypeSwitchStmt added in v1.3.3

func (ann *Annotator) VisTypeSwitchStmt(ctx *Ctx, tss *ast.TypeSwitchStmt)

func (*Annotator) VisValueSpec added in v1.3.3

func (ann *Annotator) VisValueSpec(ctx *Ctx, vs *ast.ValueSpec)

type AnnotatorSet

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

func NewAnnotatorSet

func NewAnnotatorSet(fset *token.FileSet) *AnnotatorSet

func (*AnnotatorSet) AnnotateAstFile

func (annset *AnnotatorSet) AnnotateAstFile(astFile *ast.File, ti *types.Info, nat map[ast.Node]AnnotationType) error

func (*AnnotatorSet) BuildConfigSrc added in v1.3.3

func (annset *AnnotatorSet) BuildConfigSrc(serverNetwork, serverAddr string, flags *flags) []byte

type Client

type Client struct {
	Conn     net.Conn
	Messages chan interface{}
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, network, addr string) (*Client, error)

func (*Client) Close

func (client *Client) Close() error

func (*Client) Wait

func (client *Client) Wait()

type Cmd

type Cmd struct {
	Dir string // running directory

	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer

	Client *Client
	// contains filtered or unexported fields
}

func NewCmd

func NewCmd() *Cmd

func (*Cmd) Error added in v1.1.0

func (cmd *Cmd) Error(err error)

func (*Cmd) FilesData added in v1.3.3

func (cmd *Cmd) FilesData() *debug.FilesDataMsg

func (*Cmd) Messages added in v1.3.3

func (cmd *Cmd) Messages() chan interface{}

func (*Cmd) Start

func (cmd *Cmd) Start(ctx context.Context, args []string) (bool, error)

func (*Cmd) Wait

func (cmd *Cmd) Wait() error

type CommentWithNode added in v1.3.3

type CommentWithNode struct {
	Comment *ast.Comment
	Node    ast.Node
}

type Ctx

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

func (*Ctx) SetValue

func (ctx *Ctx) SetValue(value interface{})

func (*Ctx) Value

func (ctx *Ctx) Value(id ctxId) (interface{}, *Ctx)

func (*Ctx) WithValue

func (ctx *Ctx) WithValue(id ctxId, value interface{}) *Ctx

type DebugIndex added in v1.3.3

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

type FilesToAnnotate added in v1.3.3

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

func NewFilesToAnnotate added in v1.3.3

func NewFilesToAnnotate(cmd *Cmd) *FilesToAnnotate

func (*FilesToAnnotate) GoModFilename added in v1.3.3

func (fa *FilesToAnnotate) GoModFilename() (string, bool)

type FixedDebugIndex added in v1.3.3

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

type ItemStringifier

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

func NewItemStringifier added in v1.3.3

func NewItemStringifier() *ItemStringifier

type StmtsIter added in v1.3.3

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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