mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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
This commit is contained in:
parent
863dafb9ae
commit
c45d2a767c
10 changed files with 236 additions and 278 deletions
|
|
@ -13,8 +13,7 @@ import (
|
|||
)
|
||||
|
||||
// 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 @@ var googleaddrs = []string {
|
|||
|
||||
export func TestDialGoogle(t *testing.T) {
|
||||
// If no ipv6 tunnel, don't try the last address.
|
||||
if !ipv6 {
|
||||
if !*ipv6 {
|
||||
googleaddrs[len(googleaddrs)-1] = ""
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue