gofix -r mapdelete
R=golang-dev, r, adg, r, cw
CC=golang-dev
https://golang.org/cl/5266045
diff --git a/src/pkg/http/fcgi/child.go b/src/pkg/http/fcgi/child.go
index 1971882..61dd3fb 100644
--- a/src/pkg/http/fcgi/child.go
+++ b/src/pkg/http/fcgi/child.go
@@ -194,7 +194,7 @@
case typeData:
// If the filter role is implemented, read the data stream here.
case typeAbortRequest:
- requests[rec.h.Id] = nil, false
+ delete(requests, rec.h.Id)
c.conn.writeEndRequest(rec.h.Id, 0, statusRequestComplete)
if !req.keepConn {
// connection will close upon return
diff --git a/src/pkg/http/persist.go b/src/pkg/http/persist.go
index 78bf905..f73e6c6 100644
--- a/src/pkg/http/persist.go
+++ b/src/pkg/http/persist.go
@@ -165,7 +165,7 @@
// Retrieve the pipeline ID of this request/response pair
sc.lk.Lock()
id, ok := sc.pipereq[req]
- sc.pipereq[req] = 0, false
+ delete(sc.pipereq, req)
if !ok {
sc.lk.Unlock()
return ErrPipeline
@@ -353,7 +353,7 @@
// Retrieve the pipeline ID of this request/response pair
cc.lk.Lock()
id, ok := cc.pipereq[req]
- cc.pipereq[req] = 0, false
+ delete(cc.pipereq, req)
if !ok {
cc.lk.Unlock()
return nil, ErrPipeline
diff --git a/src/pkg/http/transfer.go b/src/pkg/http/transfer.go
index 300c7a8..868a114 100644
--- a/src/pkg/http/transfer.go
+++ b/src/pkg/http/transfer.go
@@ -366,7 +366,7 @@
return nil, nil
}
- header["Transfer-Encoding"] = nil, false
+ delete(header, "Transfer-Encoding")
// Head responses have no bodies, so the transfer encoding
// should be ignored.
@@ -399,7 +399,7 @@
// Chunked encoding trumps Content-Length. See RFC 2616
// Section 4.4. Currently len(te) > 0 implies chunked
// encoding.
- header["Content-Length"] = nil, false
+ delete(header, "Content-Length")
return te, nil
}
diff --git a/src/pkg/http/transport.go b/src/pkg/http/transport.go
index b0aea97..0914af7 100644
--- a/src/pkg/http/transport.go
+++ b/src/pkg/http/transport.go
@@ -266,7 +266,7 @@
}
if len(pconns) == 1 {
pconn = pconns[0]
- t.idleConn[key] = nil, false
+ delete(t.idleConn, key)
} else {
// 2 or more cached connections; pop last
// TODO: queue?