From b2bae182eeb1ecd565d81c2c2f6dd9e3b210d5ff Mon Sep 17 00:00:00 2001 From: Mark McGranaghan Date: Sun, 23 Sep 2012 12:12:35 -0400 Subject: [PATCH] gofmt --- 008-for/for.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/008-for/for.go b/008-for/for.go index 2c29dbc..0bac477 100644 --- a/008-for/for.go +++ b/008-for/for.go @@ -2,32 +2,32 @@ // `for` is Go's only looping construct. Here are // two common forms. -package main - -import "fmt" - +package main + +import "fmt" + func main() { // Initialize `i` with `1` and loop until it's 10. - i := 1 - for i <= 3 { - fmt.Print(i) - i = i + 1 - } + i := 1 + for i <= 3 { + fmt.Print(i) + i = i + 1 + } // That type of loop is common. We can do it on one // line. - for j := 1; j <= 3; j++ { - fmt.Print(j) + for j := 1; j <= 3; j++ { + fmt.Print(j) } // `for` without a condition will loop until you // `return`. - for { - fmt.Println() - return - } -} + for { + fmt.Println() + return + } +} // We'll see other `for` forms latter.