Multiple initializers in a Go if statement
Here's how to do it:
package main
import (
"fmt"
)
func main() {
if x, y := 5, 38; x == 5 {
fmt.Printf("Whee! %d\n", y)
}
}
Tested with this revision:
changeset: 3975:b51fd2d6c160 tag: tip user: Kevin Ballard <xxxxxxxxxxxxxxxxxxxxx> date: Tue Nov 10 20:05:24 2009 -0800 summary: Implement new emacs command M-x gofmt