1
0
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:
Miles Delahunty
2023-05-23 18:10:09 +10:00
committed by GitHub
parent 2a1838f501
commit ae07914dc4
14 changed files with 261 additions and 30 deletions

View File

@@ -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 {