mirror of
https://github.com/mgechev/revive.git
synced 2025-11-29 22:28:23 +02:00
ifelse: option to preserve variable scope (#832)
* ifelse: option to preserve variable scope
This commit is contained in:
@@ -49,6 +49,9 @@ func (k BranchKind) Deviates() bool {
|
||||
}
|
||||
}
|
||||
|
||||
// Branch returns a Branch with the given kind
|
||||
func (k BranchKind) Branch() Branch { return Branch{BranchKind: k} }
|
||||
|
||||
// String returns a brief string representation
|
||||
func (k BranchKind) String() string {
|
||||
switch k {
|
||||
|
||||
Reference in New Issue
Block a user