Documentation
¶
Index ¶
- Constants
- Variables
- func ProgramPackages(ctx context.Context, fset *token.FileSet, mode packages.LoadMode, ...) ([]*packages.Package, error)
- func SetupGoMods(ctx context.Context, cmd *Cmd, files *Files, mainFilename string, tests bool) error
- func StringifyItem(item debug.Item) string
- func StringifyItemFull(item debug.Item) string
- type AnnotationType
- type Annotator
- type AnnotatorSet
- func (annset *AnnotatorSet) AnnotateAstFile(astFile *ast.File, typ AnnotationType) error
- func (annset *AnnotatorSet) AnnotateAstFile2(astFile *ast.File, typ AnnotationType, filename string, src []byte) error
- func (annset *AnnotatorSet) ConfigContent() string
- func (annset *AnnotatorSet) ConfigGoModuleContent() string
- func (annset *AnnotatorSet) Print(w io.Writer, astFile *ast.File) error
- func (annset *AnnotatorSet) TestMainSources() []*TestMainSrc
- type Client
- type Cmd
- type Ctx
- type ExprIter
- type FilePack
- type Files
- type ItemStringifier
- type StmtIter
- type TestMainSrc
Constants ¶
View Source
const DebugPkgPath = "github.com/jmigpin/editor/core/godebug/debug"
View Source
const GoDebugConfigPkgPath = "github.com/jmigpin/editor/core/godebug/godebugconfig"
Variables ¶
View Source
var DebugFilepath = filepath.FromSlash(DebugPkgPath)
View Source
var GoDebugConfigFilepath = filepath.FromSlash(GoDebugConfigPkgPath)
View Source
var SimplifyStringifyItem = true
Functions ¶
func ProgramPackages ¶
func SetupGoMods ¶
func StringifyItem ¶
func StringifyItemFull ¶
Types ¶
type AnnotationType ¶
type AnnotationType int
const ( // Order matters, last is the bigger set AnnotationTypeNone AnnotationType = iota AnnotationTypeOff AnnotationTypeBlock AnnotationTypeFile AnnotationTypePackage // last to be able to stop early )
func AnnotationTypeInComment ¶
func AnnotationTypeInComment(s string) (AnnotationType, error)
func (AnnotationType) Annotated ¶
func (t AnnotationType) Annotated() bool
type Annotator ¶
type Annotator struct {
// contains filtered or unexported fields
}
func NewAnnotator ¶
func (*Annotator) AnnotateAstFile ¶
func (ann *Annotator) AnnotateAstFile(astFile *ast.File, typ AnnotationType)
type AnnotatorSet ¶
type AnnotatorSet struct {
FSet *token.FileSet
InsertedExitIn struct {
Main bool
TestMain bool
}
// contains filtered or unexported fields
}
func NewAnnotatorSet ¶
func NewAnnotatorSet() *AnnotatorSet
func (*AnnotatorSet) AnnotateAstFile ¶
func (annset *AnnotatorSet) AnnotateAstFile(astFile *ast.File, typ AnnotationType) error
func (*AnnotatorSet) AnnotateAstFile2 ¶
func (annset *AnnotatorSet) AnnotateAstFile2(astFile *ast.File, typ AnnotationType, filename string, src []byte) error
func (*AnnotatorSet) ConfigContent ¶
func (annset *AnnotatorSet) ConfigContent() string
func (*AnnotatorSet) ConfigGoModuleContent ¶
func (annset *AnnotatorSet) ConfigGoModuleContent() string
func (*AnnotatorSet) TestMainSources ¶
func (annset *AnnotatorSet) TestMainSources() []*TestMainSrc
type Client ¶
type Cmd ¶
type Cmd struct {
Client *Client
NoModules bool // not in go.mod modules
Dir string // "" will use current dir
Stdout io.Writer
Stderr io.Writer
// contains filtered or unexported fields
}
func (*Cmd) RequestFileSetPositions ¶
func (*Cmd) RequestStart ¶
type FilePack ¶
func DebugFilePacks ¶
func DebugFilePacks() []*FilePack
type Files ¶
type Files struct {
Dir string
// contains filtered or unexported fields
}
Finds the set of files that need to be annotated/copied.
type ItemStringifier ¶
type TestMainSrc ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.