Documentation ¶
Overview ¶
Package edit implements buffered position-based editing of byte slices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Annotate ¶
func Annotate(name string, mode string, varVar string, importpathFilename string, globalCoverVarImportPath string) string
QINIU Annotate do following 1. add cover variables into the original file 2. return the cover variables declarations as plain string original dec: func annotate(name string) {
Types ¶
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
Block represents the information about a basic block to be recorded in the analysis. Note: Our definition of basic block is based on control structures; we don't break apart && and ||. We could but it doesn't seem important enough to bother.
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
A Buffer is a queue of edits to apply to a given byte slice.
func NewBuffer ¶
NewBuffer returns a new buffer to accumulate changes to an initial data slice. The returned buffer maintains a reference to the data, so the caller must ensure the data is not modified until after the Buffer is done being used.