Documentation
¶
Overview ¶
Package quickfix provides functions for fixing Go ASTs that are well typed but "go build" refuses to build.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QuickFix ¶
QuickFix rewrites AST files of same package so that they pass go build. For example:
v declared but not used -> append `_ = v` "p" imported but not used -> rewrite to `import _ "p"` no new variables on left side of := -> rewrite `:=` to `=`
TODO implement hardMode, which removes errorneous code rather than adding
func RevertQuickFix ¶
RevertQuickFix reverts possible quickfixes introduced by QuickFix. This may result to non-buildable source, and cannot reproduce the original code before first QuickFix. For example:
`_ = v` -> removed `import _ "p"` -> rewritten to `import "p"`
Types ¶
type ErrCouldNotLocate ¶
func (ErrCouldNotLocate) Error ¶
func (e ErrCouldNotLocate) Error() string
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
goquickfix
command
The goquickfix command quick fixes Go source that is well typed but go refuses to compile e.g.
|
The goquickfix command quick fixes Go source that is well typed but go refuses to compile e.g. |
Click to show internal directories.
Click to hide internal directories.