go/src/sync/example_test.go

type httpPkg

func (httpPkg) Get(url string) {}

var http

// This example fetches several URLs concurrently,
// using a WaitGroup to block until all the fetches are complete.
func ExampleWaitGroup() {}

func ExampleOnce() {}

// This example uses OnceValue to perform an "expensive" computation just once,
// even when used concurrently.
func ExampleOnceValue() {}

// This example uses OnceValues to read a file just once.
func ExampleOnceValues() {}