Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Comparison ¶
type Comparison struct{}
Comparison swaps relational operators with their logical opposites.
func (*Comparison) Apply ¶
func (m *Comparison) Apply(node ast.Node)
func (*Comparison) Name ¶
func (m *Comparison) Name() string
type Mutator ¶
type Mutator interface {
Name() string
Check(node ast.Node) bool
Apply(node ast.Node)
Position(node ast.Node) token.Pos
}
Mutator defines the interface for AST mutations.
type ReverseIfCond ¶
type ReverseIfCond struct{}
ReverseIfCond negates boolean expressions in if statements.
func (*ReverseIfCond) Apply ¶
func (m *ReverseIfCond) Apply(node ast.Node)
func (*ReverseIfCond) Name ¶
func (m *ReverseIfCond) Name() string
type SwapArithmetic ¶
type SwapArithmetic struct{}
SwapArithmetic swaps arithmetic operators.
func (*SwapArithmetic) Apply ¶
func (m *SwapArithmetic) Apply(node ast.Node)
func (*SwapArithmetic) Name ¶
func (m *SwapArithmetic) Name() string
Click to show internal directories.
Click to hide internal directories.