Documentation ¶
Index ¶
- Constants
- Variables
- func ProgramPackages(ctx context.Context, fset *token.FileSet, mode packages.LoadMode, dir string, ...) ([]*packages.Package, error)
- func SetupGoMods(ctx context.Context, cmd *Cmd, files *Files) error
- func StringifyItem(item debug.Item) string
- func StringifyItemFull(item debug.Item) string
- type AnnFileData
- type AnnotationOpt
- type AnnotationType
- type Annotator
- type AnnotatorSet
- type Client
- type Cmd
- func (cmd *Cmd) Cleanup()
- func (cmd *Cmd) Error(err error)
- func (cmd *Cmd) Printf(format string, a ...interface{}) (int, error)
- func (cmd *Cmd) RequestFileSetPositions() error
- func (cmd *Cmd) RequestStart() error
- func (cmd *Cmd) Start(ctx context.Context, args []string) (done bool, _ error)
- func (cmd *Cmd) Wait() error
- type Ctx
- type ExprIter
- type FilePack
- type Files
- func (files *Files) Add(filenames ...string)
- func (files *Files) DebugPkgFilename(filename string) string
- func (files *Files) Do(ctx context.Context, filenames []string, tests bool, env []string) error
- func (files *Files) GodebugconfigPkgFilename(filename string) string
- func (files *Files) NodeAnnType(n ast.Node) AnnotationType
- type ItemStringifier
- type StmtIter
- type TestMainSrc
Constants ¶
View Source
const DebugPkgPath = SelfModPkgPath + "/core/godebug/debug"
View Source
const GodebugconfigPkgPath = SelfModPkgPath + "/core/godebug/godebugconfig"
View Source
const SelfModPkgPath = "github.com/jmigpin/editor/v2"
Variables ¶
View Source
var SimplifyStringifyItem = true
Functions ¶
func ProgramPackages ¶
func StringifyItem ¶
func StringifyItemFull ¶
Types ¶
type AnnFileData ¶
type AnnotationOpt ¶
type AnnotationOpt struct { Type AnnotationType Opt string Comment *ast.Comment }
func AnnotationOptInComment ¶
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 ¶
func AnnotationTypeInString(s string) (AnnotationType, string, error)
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 (*AnnotatorSet) ConfigContent ¶
func (annset *AnnotatorSet) ConfigContent(network, addr string) string
func (*AnnotatorSet) TestMainSources ¶
func (annset *AnnotatorSet) TestMainSources() []*TestMainSrc
type Client ¶
type Cmd ¶
type Cmd struct { Client *Client Dir string Stdout io.Writer Stderr io.Writer NoPreBuild bool // useful for tests // 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.
func (*Files) DebugPkgFilename ¶
func (*Files) GodebugconfigPkgFilename ¶
func (*Files) NodeAnnType ¶
func (files *Files) NodeAnnType(n ast.Node) AnnotationType
type ItemStringifier ¶
type TestMainSrc ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.