simplify flag interface. no more BVal etc. you just get a pointer.
fixed everything except the tutorial.
R=rsc
DELTA=404 (94 added, 139 deleted, 171 changed)
OCL=22414
CL=22422
diff --git a/src/lib/net/dialgoogle_test.go b/src/lib/net/dialgoogle_test.go
index 86ef5b9..4a9f7ff 100644
--- a/src/lib/net/dialgoogle_test.go
+++ b/src/lib/net/dialgoogle_test.go
@@ -13,8 +13,7 @@
)
// If an IPv6 tunnel is running (see go/stubl), we can try dialing a real IPv6 address.
-var ipv6 = false
-var ipv6_flag = flag.Bool("ipv6", false, &ipv6, "assume ipv6 tunnel is present")
+var ipv6 = flag.Bool("ipv6", false, "assume ipv6 tunnel is present")
// fd is already connected to www.google.com port 80.
// Run an HTTP request to fetch the main page.
@@ -67,7 +66,7 @@
export func TestDialGoogle(t *testing.T) {
// If no ipv6 tunnel, don't try the last address.
- if !ipv6 {
+ if !*ipv6 {
googleaddrs[len(googleaddrs)-1] = ""
}