Documentation
¶
Index ¶
- Variables
- 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) Vprintf(format string, a ...interface{}) (int, error)
- func (cmd *Cmd) Wait() error
- type Ctx
- type ExprIter
- type File
- type FileAction
- type FilePack
- type Files
- type GoMods
- type ItemStringifier
- type ModFile
- type ModInfo
- type SrcFile
- type StmtIter
- type SumFile
Constants ¶
This section is empty.
Variables ¶
View Source
var SimplifyStringifyItem = true
Functions ¶
func StringifyItem ¶
func StringifyItemFull ¶
Types ¶
type AnnFileData ¶ added in v1.1.0
type AnnotationOpt ¶ added in v1.1.0
type AnnotationOpt struct {
Type AnnotationType
Opt string
Comment *ast.Comment
Node ast.Node // node associated to comment (can be nil)
}
func AnnotationOptInComment ¶ added in v1.1.0
func AnnotationOptInComment(c *ast.Comment) (*AnnotationOpt, bool, error)
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 (*Annotator) AnnotateAstFile ¶
type AnnotatorSet ¶
func NewAnnotatorSet ¶
func NewAnnotatorSet() *AnnotatorSet
func (*AnnotatorSet) AnnotateAstFile ¶
func (annset *AnnotatorSet) AnnotateAstFile(astFile *ast.File, f *SrcFile) error
func (*AnnotatorSet) InsertDebugExitInMain ¶ added in v1.3.1
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 File ¶ added in v1.3.1
type File interface {
Filename() string
Action() FileAction
// contains filtered or unexported methods
}
type FileAction ¶ added in v1.3.1
type FileAction int
const ( FANone FileAction = iota FACopy // should not be used in fileSrc (need src line references) FACreate FAAnnotate FAWrite // output from struct (ast, modfile struct) )
type FilePack ¶
func DebugFilePacks ¶
func DebugFilePacks() []*FilePack
type Files ¶
type Files struct {
// contains filtered or unexported fields
}
Finds the set of files that need to be annotated/copied.
func (*Files) NodeAnnType ¶ added in v1.1.0
func (files *Files) NodeAnnType(n ast.Node) AnnotationType
type ItemStringifier ¶
type ModFile ¶ added in v1.3.1
type ModFile struct {
// contains filtered or unexported fields
}
func (*ModFile) Action ¶ added in v1.3.1
func (f *ModFile) Action() FileAction
type SrcFile ¶ added in v1.3.1
type SrcFile struct {
// contains filtered or unexported fields
}
func (*SrcFile) Action ¶ added in v1.3.1
func (f *SrcFile) Action() FileAction
Source Files
¶
Click to show internal directories.
Click to hide internal directories.