Documentation ¶
Overview ¶
Package errfix declares the types used to replace the original go error with an error with a call stack.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiffWriter ¶
type DiffWriter struct {
// contains filtered or unexported fields
}
DiffWriter implements the Writer interface, and it can generate diffs of old and new files.
func NewDiffWriter ¶
func NewDiffWriter(write bool) *DiffWriter
NewDiffWriter returns a DiffWriter structure. When write is true and if there is a difference between the old and new files, then the content of the new file will overwrite the content of the old file.
func (*DiffWriter) DiffString ¶
func (w *DiffWriter) DiffString() string
DiffString returns the differences of files currently held in the buffer.
type ErrFix ¶
type ErrFix struct {
// contains filtered or unexported fields
}
ErrFix converts a simple go error into an error carrying contextual information such as the call stack.
type File ¶
File represents a go file. The Error field will be set when an error occurs while reading or processing the file.
type Processor ¶
Processor is an interface that only contains the Process method. It converts the input file into a new file through built-in rules.
func NewProcessor ¶
func NewProcessor() Processor
NewProcessor returns a default Processor interface.