| // Copyright 2012 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| func (httpPkg) Get(url string) {} |
| // This example fetches several URLs concurrently, |
| // using a WaitGroup to block until all the fetches are complete. |
| func ExampleWaitGroup() { |
| "http://www.golang.org/", |
| "http://www.google.com/", |
| "http://www.example.com/", |
| for _, url := range urls { |
| // Increment the WaitGroup counter. |
| // Launch a goroutine to fetch the URL. |
| // Decrement the counter when the goroutine completes. |
| // Wait for all HTTP fetches to complete. |
| for i := 0; i < 10; i++ { |
| for i := 0; i < 10; i++ { |