]> Cypherpunks repositories - gostls13.git/commitdiff
sync/atomic: remove test dependency on net/http
authorRuss Cox <rsc@golang.org>
Mon, 1 Jul 2013 21:27:19 +0000 (17:27 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 1 Jul 2013 21:27:19 +0000 (17:27 -0400)
Depending on net/http means depending on cgo.
When the tree is in a shaky state it's nice to see sync/atomic
pass even if cgo or net causes broken binaries.

R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/10753044

src/pkg/sync/example_test.go

index 031c87f03b157785dc7d949a63db2e7b9a6dcb9d..bdd3af6fedaa4bb25b7cb6b2990a5aa171209612 100644 (file)
@@ -6,10 +6,15 @@ package sync_test
 
 import (
        "fmt"
-       "net/http"
        "sync"
 )
 
+type httpPkg struct{}
+
+func (httpPkg) Get(url string) {}
+
+var http httpPkg
+
 // This example fetches several URLs concurrently,
 // using a WaitGroup to block until all the fetches are complete.
 func ExampleWaitGroup() {