godebug

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 40 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 StringifyItem2 added in v1.3.8

func StringifyItem2(item debug.Item, valueStrLen int) string

func StringifyItemFull

func StringifyItemFull(item debug.Item) string

Types

type AnnSetDebugOpt added in v1.3.7

type AnnSetDebugOpt struct {
	PkgPath   string
	PkgName   string
	VarPrefix string
}

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, ti *types.Info, dopt *AnnSetDebugOpt) *Annotator

func (*Annotator) AnnotateAstFile

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

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, testModeMainFunc bool) (*Annotator, error)

type Cmd

type Cmd struct {
	Dir string // running directory

	CmdLineMode bool

	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
	// 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) ParseFlagsOnce added in v1.3.8

func (cmd *Cmd) ParseFlagsOnce(args []string) error

allow direct external access to this feature (ex: godebug -h)

func (*Cmd) ProtoRead added in v1.3.7

func (cmd *Cmd) ProtoRead() (_ any, ok bool, _ error)

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
}

type DebugExpr added in v1.3.7

type DebugExpr ast.Expr

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 Flags added in v1.3.7

type Flags 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
}

type TType added in v1.3.7

type TType struct {
	Type types.Type // cache, check typeTypes()
	// contains filtered or unexported fields
}

types type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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