From f3794ba244401942f1e5b5f0b10cda68cc114c6e Mon Sep 17 00:00:00 2001 From: Stephen McQuay Date: Tue, 14 May 2013 21:01:26 -0700 Subject: [PATCH] go fmt --- search.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/search.go b/search.go index d87d8c8..9094ac3 100644 --- a/search.go +++ b/search.go @@ -26,20 +26,20 @@ func fakeSearch(kind string) Search { } func Google(query string) (results []Result) { - c := make(chan Result) - go func(){c <- Web(query)}() - go func(){c <- Image(query)}() - go func(){c <- Video(query)}() + c := make(chan Result) + go func() { c <- Web(query) }() + go func() { c <- Image(query) }() + go func() { c <- Video(query) }() - timeout := time.After(80 * time.Millisecond) - for i :=0; i < 3; i++ { - select{ - case result := <- c: - results = append(results, result) - case <- timeout: - fmt.Println("timed out!!") - return - } - } + timeout := time.After(80 * time.Millisecond) + for i := 0; i < 3; i++ { + select { + case result := <-c: + results = append(results, result) + case <-timeout: + fmt.Println("timed out!!") + return + } + } return }