diff --git a/src/029-concurrent-goroutines/concurrent-goroutines.go b/src/029-concurrent-goroutines/concurrent-goroutines.go index 9b3d264..9efca37 100644 --- a/src/029-concurrent-goroutines/concurrent-goroutines.go +++ b/src/029-concurrent-goroutines/concurrent-goroutines.go @@ -9,9 +9,8 @@ import "fmt" func f(n int) { for i := 0; i < 10; i++ { fmt.Println(n, ":", i) - breakTime := time.Duration(rand.Intn(150))) + breakTime := time.Duration(rand.Intn(150)) time.Sleep(time.Millisecond * breakTime) - } } diff --git a/src/043-state-goroutine/state-goroutine.go b/src/043-state-goroutine/state-goroutine.go index 39c1ade..c90c313 100644 --- a/src/043-state-goroutine/state-goroutine.go +++ b/src/043-state-goroutine/state-goroutine.go @@ -63,9 +63,10 @@ func generateWrites(writes chan *writeOp) { for { key := randKey() val := randVal() - write := &writeOp{key: key, - val: val, - resp: make(chan bool)} + write := &writeOp{ + key: key, + val: val, + resp: make(chan bool)} writes <- write <-write.resp atomic.AddInt64(&opCount, 1) diff --git a/src/051-bytes/bytes.go b/src/051-bytes/bytes.go index bac0bd4..95cfe23 100644 --- a/src/051-bytes/bytes.go +++ b/src/051-bytes/bytes.go @@ -6,7 +6,7 @@ import "fmt" func main() { arr := []byte("some bytes") - str := string([]byte{'a',' ','s','t','r','i','n','g'}) + str := string([]byte{'s', 't', 'r', 'i', 'n', 'g'}) fmt.Println(arr) fmt.Println(str) } diff --git a/src/079-request-logging/request-logging.go b/src/079-request-logging/request-logging.go index 812db1e..ebbf5f8 100644 --- a/src/079-request-logging/request-logging.go +++ b/src/079-request-logging/request-logging.go @@ -22,7 +22,7 @@ func wrapLogging(f http.HandlerFunc) http.HandlerFunc { path := req.URL.Path elapsed := float64(time.Since(start)) / 1000000.0 logs <- fmt.Sprintf("method=%s path=%s elapsed=%f", - method, path, elapsed) + method, path, elapsed) } } diff --git a/src/081-basic-authentication/basic-authentication.go b/src/081-basic-authentication/basic-authentication.go index 5a5dde9..e185f72 100644 --- a/src/081-basic-authentication/basic-authentication.go +++ b/src/081-basic-authentication/basic-authentication.go @@ -30,7 +30,7 @@ func testAuth(r *http.Request, auth Auth) bool { func requireAuth(w http.ResponseWriter, r *http.Request) { w.Header().Set("WWW-Authenticate", - "Basic realm=\"private\"") + "Basic realm=\"private\"") w.WriteHeader(401) w.Write([]byte("401 Unauthorized\n")) }