Unnecessary Else If a variable is set in both branches of an if, it can be replaced with a single if. BadGood var a int if b { a = 100 } else { a = 10 } a := 10 if b { a = 100 }