• Daniel Martí's avatar
    cmd: remove some unnecessary gotos · 9ecf899b
    Daniel Martí authored
    Pick the low-hanging fruit, which are the gotos that don't go very far
    and labels that aren't used often. All of them have easy replacements
    with breaks and returns.
    
    One slightly tricky rewrite is defaultlitreuse. We cannot use a defer
    func to reset lineno, because one of its return paths does not reset
    lineno, and thus broke toolstash -cmp.
    
    Passes toolstash -cmp on std cmd.
    
    Change-Id: Id1c0967868d69bb073addc7c5c3017ca91ff966f
    Reviewed-on: https://go-review.googlesource.com/110063
    Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    9ecf899b
asm0.go 48.8 KB