Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
313c8224
Commit
313c8224
authored
Oct 18, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gofix -r mapdelete
R=golang-dev, r, adg, r, cw CC=golang-dev
https://golang.org/cl/5266045
parent
7242052b
Changes
28
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
40 additions
and
35 deletions
+40
-35
src/cmd/cgo/gcc.go
src/cmd/cgo/gcc.go
+1
-1
src/cmd/gofmt/rewrite.go
src/cmd/gofmt/rewrite.go
+1
-1
src/pkg/debug/dwarf/type.go
src/pkg/debug/dwarf/type.go
+1
-1
src/pkg/exp/types/check_test.go
src/pkg/exp/types/check_test.go
+1
-1
src/pkg/exp/types/universe.go
src/pkg/exp/types/universe.go
+1
-0
src/pkg/gob/decode.go
src/pkg/gob/decode.go
+2
-2
src/pkg/gob/type.go
src/pkg/gob/type.go
+1
-1
src/pkg/http/fcgi/child.go
src/pkg/http/fcgi/child.go
+1
-1
src/pkg/http/persist.go
src/pkg/http/persist.go
+2
-2
src/pkg/http/transfer.go
src/pkg/http/transfer.go
+2
-2
src/pkg/http/transport.go
src/pkg/http/transport.go
+1
-1
src/pkg/net/fd.go
src/pkg/net/fd.go
+2
-2
src/pkg/net/fd_linux.go
src/pkg/net/fd_linux.go
+1
-1
src/pkg/net/textproto/header.go
src/pkg/net/textproto/header.go
+1
-1
src/pkg/net/textproto/pipeline.go
src/pkg/net/textproto/pipeline.go
+1
-1
src/pkg/old/netchan/export.go
src/pkg/old/netchan/export.go
+2
-2
src/pkg/old/netchan/import.go
src/pkg/old/netchan/import.go
+2
-2
src/pkg/os/inotify/inotify_linux.go
src/pkg/os/inotify/inotify_linux.go
+1
-1
src/pkg/reflect/type.go
src/pkg/reflect/type.go
+1
-1
src/pkg/rpc/client.go
src/pkg/rpc/client.go
+1
-1
src/pkg/rpc/jsonrpc/client.go
src/pkg/rpc/jsonrpc/client.go
+1
-1
src/pkg/rpc/jsonrpc/server.go
src/pkg/rpc/jsonrpc/server.go
+1
-1
src/pkg/syscall/syscall_unix.go
src/pkg/syscall/syscall_unix.go
+1
-1
src/pkg/unicode/maketables.go
src/pkg/unicode/maketables.go
+1
-1
src/pkg/unicode/script_test.go
src/pkg/unicode/script_test.go
+3
-3
src/pkg/url/url.go
src/pkg/url/url.go
+1
-1
src/pkg/xml/xml.go
src/pkg/xml/xml.go
+5
-1
test/nil.go
test/nil.go
+1
-1
No files found.
src/cmd/cgo/gcc.go
View file @
313c8224
...
@@ -588,7 +588,7 @@ func (p *Package) loadDWARF(f *File, names []*Name) {
...
@@ -588,7 +588,7 @@ func (p *Package) loadDWARF(f *File, names []*Name) {
n
.
Const
=
strconv
.
Itoa64
(
n
.
Type
.
EnumValues
[
k
])
n
.
Const
=
strconv
.
Itoa64
(
n
.
Type
.
EnumValues
[
k
])
// Remove injected enum to ensure the value will deep-compare
// Remove injected enum to ensure the value will deep-compare
// equally in future loads of the same constant.
// equally in future loads of the same constant.
n
.
Type
.
EnumValues
[
k
]
=
0
,
false
delete
(
n
.
Type
.
EnumValues
,
k
)
}
else
if
n
.
Kind
==
"const"
&&
i
<
len
(
enumVal
)
{
}
else
if
n
.
Kind
==
"const"
&&
i
<
len
(
enumVal
)
{
n
.
Const
=
strconv
.
Itoa64
(
enumVal
[
i
])
n
.
Const
=
strconv
.
Itoa64
(
enumVal
[
i
])
}
}
...
...
src/cmd/gofmt/rewrite.go
View file @
313c8224
...
@@ -65,7 +65,7 @@ func rewriteFile(pattern, replace ast.Expr, p *ast.File) *ast.File {
...
@@ -65,7 +65,7 @@ func rewriteFile(pattern, replace ast.Expr, p *ast.File) *ast.File {
return
reflect
.
Value
{}
return
reflect
.
Value
{}
}
}
for
k
:=
range
m
{
for
k
:=
range
m
{
m
[
k
]
=
reflect
.
Value
{},
false
delete
(
m
,
k
)
}
}
val
=
apply
(
f
,
val
)
val
=
apply
(
f
,
val
)
if
match
(
m
,
pat
,
val
)
{
if
match
(
m
,
pat
,
val
)
{
...
...
src/pkg/debug/dwarf/type.go
View file @
313c8224
...
@@ -579,6 +579,6 @@ Error:
...
@@ -579,6 +579,6 @@ Error:
// If the parse fails, take the type out of the cache
// If the parse fails, take the type out of the cache
// so that the next call with this offset doesn't hit
// so that the next call with this offset doesn't hit
// the cache and return success.
// the cache and return success.
d
.
typeCache
[
off
]
=
nil
,
false
d
elete
(
d
.
typeCache
,
off
)
return
nil
,
err
return
nil
,
err
}
}
src/pkg/exp/types/check_test.go
View file @
313c8224
...
@@ -154,7 +154,7 @@ func eliminate(t *testing.T, expected map[token.Pos]string, errors os.Error) {
...
@@ -154,7 +154,7 @@ func eliminate(t *testing.T, expected map[token.Pos]string, errors os.Error) {
continue
continue
}
}
// we have a match - eliminate this error
// we have a match - eliminate this error
expected
[
pos
]
=
""
,
false
delete
(
expected
,
pos
)
}
else
{
}
else
{
// To keep in mind when analyzing failed test output:
// To keep in mind when analyzing failed test output:
// If the same error position occurs multiple times in errors,
// If the same error position occurs multiple times in errors,
...
...
src/pkg/exp/types/universe.go
View file @
313c8224
...
@@ -81,6 +81,7 @@ func init() {
...
@@ -81,6 +81,7 @@ func init() {
defFun
(
"close"
)
defFun
(
"close"
)
defFun
(
"complex"
)
defFun
(
"complex"
)
defFun
(
"copy"
)
defFun
(
"copy"
)
defFun
(
"delete"
)
defFun
(
"imag"
)
defFun
(
"imag"
)
defFun
(
"len"
)
defFun
(
"len"
)
defFun
(
"make"
)
defFun
(
"make"
)
...
...
src/pkg/gob/decode.go
View file @
313c8224
...
@@ -1154,7 +1154,7 @@ func (dec *Decoder) getDecEnginePtr(remoteId typeId, ut *userTypeInfo) (enginePt
...
@@ -1154,7 +1154,7 @@ func (dec *Decoder) getDecEnginePtr(remoteId typeId, ut *userTypeInfo) (enginePt
decoderMap
[
remoteId
]
=
enginePtr
decoderMap
[
remoteId
]
=
enginePtr
*
enginePtr
,
err
=
dec
.
compileDec
(
remoteId
,
ut
)
*
enginePtr
,
err
=
dec
.
compileDec
(
remoteId
,
ut
)
if
err
!=
nil
{
if
err
!=
nil
{
de
coderMap
[
remoteId
]
=
nil
,
false
de
lete
(
decoderMap
,
remoteId
)
}
}
}
}
return
return
...
@@ -1179,7 +1179,7 @@ func (dec *Decoder) getIgnoreEnginePtr(wireId typeId) (enginePtr **decEngine, er
...
@@ -1179,7 +1179,7 @@ func (dec *Decoder) getIgnoreEnginePtr(wireId typeId) (enginePtr **decEngine, er
*
enginePtr
,
err
=
dec
.
compileIgnoreSingle
(
wireId
)
*
enginePtr
,
err
=
dec
.
compileIgnoreSingle
(
wireId
)
}
}
if
err
!=
nil
{
if
err
!=
nil
{
de
c
.
ignorerCache
[
wireId
]
=
nil
,
false
de
lete
(
dec
.
ignorerCache
,
wireId
)
}
}
}
}
return
return
...
...
src/pkg/gob/type.go
View file @
313c8224
...
@@ -405,7 +405,7 @@ func newTypeObject(name string, ut *userTypeInfo, rt reflect.Type) (gobType, os.
...
@@ -405,7 +405,7 @@ func newTypeObject(name string, ut *userTypeInfo, rt reflect.Type) (gobType, os.
var
type0
,
type1
gobType
var
type0
,
type1
gobType
defer
func
()
{
defer
func
()
{
if
err
!=
nil
{
if
err
!=
nil
{
types
[
rt
]
=
nil
,
false
delete
(
types
,
rt
)
}
}
}()
}()
// Install the top-level type before the subtypes (e.g. struct before
// Install the top-level type before the subtypes (e.g. struct before
...
...
src/pkg/http/fcgi/child.go
View file @
313c8224
...
@@ -194,7 +194,7 @@ func (c *child) serve() {
...
@@ -194,7 +194,7 @@ func (c *child) serve() {
case
typeData
:
case
typeData
:
// If the filter role is implemented, read the data stream here.
// If the filter role is implemented, read the data stream here.
case
typeAbortRequest
:
case
typeAbortRequest
:
requests
[
rec
.
h
.
Id
]
=
nil
,
false
delete
(
requests
,
rec
.
h
.
Id
)
c
.
conn
.
writeEndRequest
(
rec
.
h
.
Id
,
0
,
statusRequestComplete
)
c
.
conn
.
writeEndRequest
(
rec
.
h
.
Id
,
0
,
statusRequestComplete
)
if
!
req
.
keepConn
{
if
!
req
.
keepConn
{
// connection will close upon return
// connection will close upon return
...
...
src/pkg/http/persist.go
View file @
313c8224
...
@@ -165,7 +165,7 @@ func (sc *ServerConn) Write(req *Request, resp *Response) os.Error {
...
@@ -165,7 +165,7 @@ func (sc *ServerConn) Write(req *Request, resp *Response) os.Error {
// Retrieve the pipeline ID of this request/response pair
// Retrieve the pipeline ID of this request/response pair
sc
.
lk
.
Lock
()
sc
.
lk
.
Lock
()
id
,
ok
:=
sc
.
pipereq
[
req
]
id
,
ok
:=
sc
.
pipereq
[
req
]
sc
.
pipereq
[
req
]
=
0
,
false
delete
(
sc
.
pipereq
,
req
)
if
!
ok
{
if
!
ok
{
sc
.
lk
.
Unlock
()
sc
.
lk
.
Unlock
()
return
ErrPipeline
return
ErrPipeline
...
@@ -353,7 +353,7 @@ func (cc *ClientConn) readUsing(req *Request, readRes func(*bufio.Reader, *Reque
...
@@ -353,7 +353,7 @@ func (cc *ClientConn) readUsing(req *Request, readRes func(*bufio.Reader, *Reque
// Retrieve the pipeline ID of this request/response pair
// Retrieve the pipeline ID of this request/response pair
cc
.
lk
.
Lock
()
cc
.
lk
.
Lock
()
id
,
ok
:=
cc
.
pipereq
[
req
]
id
,
ok
:=
cc
.
pipereq
[
req
]
cc
.
pipereq
[
req
]
=
0
,
false
delete
(
cc
.
pipereq
,
req
)
if
!
ok
{
if
!
ok
{
cc
.
lk
.
Unlock
()
cc
.
lk
.
Unlock
()
return
nil
,
ErrPipeline
return
nil
,
ErrPipeline
...
...
src/pkg/http/transfer.go
View file @
313c8224
...
@@ -366,7 +366,7 @@ func fixTransferEncoding(requestMethod string, header Header) ([]string, os.Erro
...
@@ -366,7 +366,7 @@ func fixTransferEncoding(requestMethod string, header Header) ([]string, os.Erro
return
nil
,
nil
return
nil
,
nil
}
}
header
[
"Transfer-Encoding"
]
=
nil
,
false
delete
(
header
,
"Transfer-Encoding"
)
// Head responses have no bodies, so the transfer encoding
// Head responses have no bodies, so the transfer encoding
// should be ignored.
// should be ignored.
...
@@ -399,7 +399,7 @@ func fixTransferEncoding(requestMethod string, header Header) ([]string, os.Erro
...
@@ -399,7 +399,7 @@ func fixTransferEncoding(requestMethod string, header Header) ([]string, os.Erro
// Chunked encoding trumps Content-Length. See RFC 2616
// Chunked encoding trumps Content-Length. See RFC 2616
// Section 4.4. Currently len(te) > 0 implies chunked
// Section 4.4. Currently len(te) > 0 implies chunked
// encoding.
// encoding.
header
[
"Content-Length"
]
=
nil
,
false
delete
(
header
,
"Content-Length"
)
return
te
,
nil
return
te
,
nil
}
}
...
...
src/pkg/http/transport.go
View file @
313c8224
...
@@ -266,7 +266,7 @@ func (t *Transport) getIdleConn(cm *connectMethod) (pconn *persistConn) {
...
@@ -266,7 +266,7 @@ func (t *Transport) getIdleConn(cm *connectMethod) (pconn *persistConn) {
}
}
if
len
(
pconns
)
==
1
{
if
len
(
pconns
)
==
1
{
pconn
=
pconns
[
0
]
pconn
=
pconns
[
0
]
t
.
idleConn
[
key
]
=
nil
,
false
delete
(
t
.
idleConn
,
key
)
}
else
{
}
else
{
// 2 or more cached connections; pop last
// 2 or more cached connections; pop last
// TODO: queue?
// TODO: queue?
...
...
src/pkg/net/fd.go
View file @
313c8224
...
@@ -152,7 +152,7 @@ func (s *pollServer) LookupFD(fd int, mode int) *netFD {
...
@@ -152,7 +152,7 @@ func (s *pollServer) LookupFD(fd int, mode int) *netFD {
if
!
ok
{
if
!
ok
{
return
nil
return
nil
}
}
s
.
pending
[
key
]
=
nil
,
false
delete
(
s
.
pending
,
key
)
return
netfd
return
netfd
}
}
...
@@ -195,7 +195,7 @@ func (s *pollServer) CheckDeadlines() {
...
@@ -195,7 +195,7 @@ func (s *pollServer) CheckDeadlines() {
}
}
if
t
>
0
{
if
t
>
0
{
if
t
<=
now
{
if
t
<=
now
{
s
.
pending
[
key
]
=
nil
,
false
delete
(
s
.
pending
,
key
)
if
mode
==
'r'
{
if
mode
==
'r'
{
s
.
poll
.
DelFD
(
fd
.
sysfd
,
mode
)
s
.
poll
.
DelFD
(
fd
.
sysfd
,
mode
)
fd
.
rdeadline
=
-
1
fd
.
rdeadline
=
-
1
...
...
src/pkg/net/fd_linux.go
View file @
313c8224
...
@@ -105,7 +105,7 @@ func (p *pollster) StopWaiting(fd int, bits uint) {
...
@@ -105,7 +105,7 @@ func (p *pollster) StopWaiting(fd int, bits uint) {
if
e
:=
syscall
.
EpollCtl
(
p
.
epfd
,
syscall
.
EPOLL_CTL_DEL
,
fd
,
nil
);
e
!=
0
{
if
e
:=
syscall
.
EpollCtl
(
p
.
epfd
,
syscall
.
EPOLL_CTL_DEL
,
fd
,
nil
);
e
!=
0
{
print
(
"Epoll delete fd="
,
fd
,
": "
,
os
.
Errno
(
e
)
.
String
(),
"
\n
"
)
print
(
"Epoll delete fd="
,
fd
,
": "
,
os
.
Errno
(
e
)
.
String
(),
"
\n
"
)
}
}
p
.
events
[
fd
]
=
0
,
false
delete
(
p
.
events
,
fd
)
}
}
}
}
...
...
src/pkg/net/textproto/header.go
View file @
313c8224
...
@@ -39,5 +39,5 @@ func (h MIMEHeader) Get(key string) string {
...
@@ -39,5 +39,5 @@ func (h MIMEHeader) Get(key string) string {
// Del deletes the values associated with key.
// Del deletes the values associated with key.
func
(
h
MIMEHeader
)
Del
(
key
string
)
{
func
(
h
MIMEHeader
)
Del
(
key
string
)
{
h
[
CanonicalMIMEHeaderKey
(
key
)]
=
nil
,
false
delete
(
h
,
CanonicalMIMEHeaderKey
(
key
))
}
}
src/pkg/net/textproto/pipeline.go
View file @
313c8224
...
@@ -108,7 +108,7 @@ func (s *sequencer) End(id uint) {
...
@@ -108,7 +108,7 @@ func (s *sequencer) End(id uint) {
}
}
c
,
ok
:=
s
.
wait
[
id
]
c
,
ok
:=
s
.
wait
[
id
]
if
ok
{
if
ok
{
s
.
wait
[
id
]
=
nil
,
false
delete
(
s
.
wait
,
id
)
}
}
s
.
mu
.
Unlock
()
s
.
mu
.
Unlock
()
if
ok
{
if
ok
{
...
...
src/pkg/old/netchan/export.go
View file @
313c8224
...
@@ -314,7 +314,7 @@ func (exp *Exporter) addClient(conn io.ReadWriter) *expClient {
...
@@ -314,7 +314,7 @@ func (exp *Exporter) addClient(conn io.ReadWriter) *expClient {
// delClient forgets the client existed
// delClient forgets the client existed
func
(
exp
*
Exporter
)
delClient
(
client
*
expClient
)
{
func
(
exp
*
Exporter
)
delClient
(
client
*
expClient
)
{
exp
.
mu
.
Lock
()
exp
.
mu
.
Lock
()
exp
.
clients
[
client
]
=
false
,
false
delete
(
exp
.
clients
,
client
)
exp
.
mu
.
Unlock
()
exp
.
mu
.
Unlock
()
}
}
...
@@ -388,7 +388,7 @@ func (exp *Exporter) Hangup(name string) os.Error {
...
@@ -388,7 +388,7 @@ func (exp *Exporter) Hangup(name string) os.Error {
exp
.
mu
.
Lock
()
exp
.
mu
.
Lock
()
chDir
,
ok
:=
exp
.
names
[
name
]
chDir
,
ok
:=
exp
.
names
[
name
]
if
ok
{
if
ok
{
exp
.
names
[
name
]
=
nil
,
false
delete
(
exp
.
names
,
name
)
}
}
// TODO drop all instances of channel from client sets
// TODO drop all instances of channel from client sets
exp
.
mu
.
Unlock
()
exp
.
mu
.
Unlock
()
...
...
src/pkg/old/netchan/import.go
View file @
313c8224
...
@@ -256,8 +256,8 @@ func (imp *Importer) Hangup(name string) os.Error {
...
@@ -256,8 +256,8 @@ func (imp *Importer) Hangup(name string) os.Error {
if
nc
==
nil
{
if
nc
==
nil
{
return
os
.
NewError
(
"netchan import: hangup: no such channel: "
+
name
)
return
os
.
NewError
(
"netchan import: hangup: no such channel: "
+
name
)
}
}
imp
.
names
[
name
]
=
nil
,
false
delete
(
imp
.
names
,
name
)
imp
.
chans
[
nc
.
id
]
=
nil
,
false
delete
(
imp
.
chans
,
nc
.
id
)
nc
.
close
()
nc
.
close
()
return
nil
return
nil
}
}
...
...
src/pkg/os/inotify/inotify_linux.go
View file @
313c8224
...
@@ -131,7 +131,7 @@ func (w *Watcher) RemoveWatch(path string) os.Error {
...
@@ -131,7 +131,7 @@ func (w *Watcher) RemoveWatch(path string) os.Error {
if
success
==
-
1
{
if
success
==
-
1
{
return
os
.
NewSyscallError
(
"inotify_rm_watch"
,
errno
)
return
os
.
NewSyscallError
(
"inotify_rm_watch"
,
errno
)
}
}
w
.
watches
[
path
]
=
nil
,
false
delete
(
w
.
watches
,
path
)
return
nil
return
nil
}
}
...
...
src/pkg/reflect/type.go
View file @
313c8224
...
@@ -876,7 +876,7 @@ L:
...
@@ -876,7 +876,7 @@ L:
fd
=
inf
fd
=
inf
}
}
mark
[
t
]
=
false
,
false
delete
(
mark
,
t
)
return
return
}
}
...
...
src/pkg/rpc/client.go
View file @
313c8224
...
@@ -104,7 +104,7 @@ func (client *Client) input() {
...
@@ -104,7 +104,7 @@ func (client *Client) input() {
seq
:=
response
.
Seq
seq
:=
response
.
Seq
client
.
mutex
.
Lock
()
client
.
mutex
.
Lock
()
c
:=
client
.
pending
[
seq
]
c
:=
client
.
pending
[
seq
]
client
.
pending
[
seq
]
=
c
,
false
delete
(
client
.
pending
,
seq
)
client
.
mutex
.
Unlock
()
client
.
mutex
.
Unlock
()
if
response
.
Error
==
""
{
if
response
.
Error
==
""
{
...
...
src/pkg/rpc/jsonrpc/client.go
View file @
313c8224
...
@@ -79,7 +79,7 @@ func (c *clientCodec) ReadResponseHeader(r *rpc.Response) os.Error {
...
@@ -79,7 +79,7 @@ func (c *clientCodec) ReadResponseHeader(r *rpc.Response) os.Error {
c
.
mutex
.
Lock
()
c
.
mutex
.
Lock
()
r
.
ServiceMethod
=
c
.
pending
[
c
.
resp
.
Id
]
r
.
ServiceMethod
=
c
.
pending
[
c
.
resp
.
Id
]
c
.
pending
[
c
.
resp
.
Id
]
=
""
,
false
delete
(
c
.
pending
,
c
.
resp
.
Id
)
c
.
mutex
.
Unlock
()
c
.
mutex
.
Unlock
()
r
.
Error
=
""
r
.
Error
=
""
...
...
src/pkg/rpc/jsonrpc/server.go
View file @
313c8224
...
@@ -107,7 +107,7 @@ func (c *serverCodec) WriteResponse(r *rpc.Response, x interface{}) os.Error {
...
@@ -107,7 +107,7 @@ func (c *serverCodec) WriteResponse(r *rpc.Response, x interface{}) os.Error {
c
.
mutex
.
Unlock
()
c
.
mutex
.
Unlock
()
return
os
.
NewError
(
"invalid sequence number in response"
)
return
os
.
NewError
(
"invalid sequence number in response"
)
}
}
c
.
pending
[
r
.
Seq
]
=
nil
,
false
delete
(
c
.
pending
,
r
.
Seq
)
c
.
mutex
.
Unlock
()
c
.
mutex
.
Unlock
()
if
b
==
nil
{
if
b
==
nil
{
...
...
src/pkg/syscall/syscall_unix.go
View file @
313c8224
...
@@ -87,6 +87,6 @@ func (m *mmapper) Munmap(data []byte) (errno int) {
...
@@ -87,6 +87,6 @@ func (m *mmapper) Munmap(data []byte) (errno int) {
if
errno
:=
m
.
munmap
(
uintptr
(
unsafe
.
Pointer
(
&
b
[
0
])),
uintptr
(
len
(
b
)));
errno
!=
0
{
if
errno
:=
m
.
munmap
(
uintptr
(
unsafe
.
Pointer
(
&
b
[
0
])),
uintptr
(
len
(
b
)));
errno
!=
0
{
return
errno
return
errno
}
}
m
.
active
[
p
]
=
nil
,
false
delete
(
m
.
active
,
p
)
return
0
return
0
}
}
src/pkg/unicode/maketables.go
View file @
313c8224
...
@@ -1152,7 +1152,7 @@ func foldExceptions(class []int) map[int]bool {
...
@@ -1152,7 +1152,7 @@ func foldExceptions(class []int) map[int]bool {
// Remove class itself.
// Remove class itself.
for
_
,
r
:=
range
class
{
for
_
,
r
:=
range
class
{
m
[
r
]
=
false
,
false
delete
(
m
,
r
)
}
}
// What's left is the exceptions.
// What's left is the exceptions.
...
...
src/pkg/unicode/script_test.go
View file @
313c8224
...
@@ -206,7 +206,7 @@ func TestScripts(t *testing.T) {
...
@@ -206,7 +206,7 @@ func TestScripts(t *testing.T) {
if
!
Is
(
Scripts
[
test
.
script
],
test
.
rune
)
{
if
!
Is
(
Scripts
[
test
.
script
],
test
.
rune
)
{
t
.
Errorf
(
"IsScript(%U, %s) = false, want true"
,
test
.
rune
,
test
.
script
)
t
.
Errorf
(
"IsScript(%U, %s) = false, want true"
,
test
.
rune
,
test
.
script
)
}
}
notTested
[
test
.
script
]
=
false
,
false
delete
(
notTested
,
test
.
script
)
}
}
for
_
,
test
:=
range
outTest
{
for
_
,
test
:=
range
outTest
{
if
Is
(
Scripts
[
test
.
script
],
test
.
rune
)
{
if
Is
(
Scripts
[
test
.
script
],
test
.
rune
)
{
...
@@ -230,7 +230,7 @@ func TestCategories(t *testing.T) {
...
@@ -230,7 +230,7 @@ func TestCategories(t *testing.T) {
if
!
Is
(
Categories
[
test
.
script
],
test
.
rune
)
{
if
!
Is
(
Categories
[
test
.
script
],
test
.
rune
)
{
t
.
Errorf
(
"IsCategory(%U, %s) = false, want true"
,
test
.
rune
,
test
.
script
)
t
.
Errorf
(
"IsCategory(%U, %s) = false, want true"
,
test
.
rune
,
test
.
script
)
}
}
notTested
[
test
.
script
]
=
false
,
false
delete
(
notTested
,
test
.
script
)
}
}
for
k
:=
range
notTested
{
for
k
:=
range
notTested
{
t
.
Error
(
"category not tested:"
,
k
)
t
.
Error
(
"category not tested:"
,
k
)
...
@@ -249,7 +249,7 @@ func TestProperties(t *testing.T) {
...
@@ -249,7 +249,7 @@ func TestProperties(t *testing.T) {
if
!
Is
(
Properties
[
test
.
script
],
test
.
rune
)
{
if
!
Is
(
Properties
[
test
.
script
],
test
.
rune
)
{
t
.
Errorf
(
"IsCategory(%U, %s) = false, want true"
,
test
.
rune
,
test
.
script
)
t
.
Errorf
(
"IsCategory(%U, %s) = false, want true"
,
test
.
rune
,
test
.
script
)
}
}
notTested
[
test
.
script
]
=
false
,
false
delete
(
notTested
,
test
.
script
)
}
}
for
k
:=
range
notTested
{
for
k
:=
range
notTested
{
t
.
Error
(
"property not tested:"
,
k
)
t
.
Error
(
"property not tested:"
,
k
)
...
...
src/pkg/url/url.go
View file @
313c8224
...
@@ -517,7 +517,7 @@ func (v Values) Add(key, value string) {
...
@@ -517,7 +517,7 @@ func (v Values) Add(key, value string) {
// Del deletes the values associated with key.
// Del deletes the values associated with key.
func
(
v
Values
)
Del
(
key
string
)
{
func
(
v
Values
)
Del
(
key
string
)
{
v
[
key
]
=
nil
,
false
delete
(
v
,
key
)
}
}
// ParseQuery parses the URL-encoded query string and returns
// ParseQuery parses the URL-encoded query string and returns
...
...
src/pkg/xml/xml.go
View file @
313c8224
...
@@ -390,7 +390,11 @@ func (p *Parser) popElement(t *EndElement) bool {
...
@@ -390,7 +390,11 @@ func (p *Parser) popElement(t *EndElement) bool {
// translations that were associated with the element we just closed.
// translations that were associated with the element we just closed.
for
p
.
stk
!=
nil
&&
p
.
stk
.
kind
!=
stkStart
{
for
p
.
stk
!=
nil
&&
p
.
stk
.
kind
!=
stkStart
{
s
:=
p
.
pop
()
s
:=
p
.
pop
()
p
.
ns
[
s
.
name
.
Local
]
=
s
.
name
.
Space
,
s
.
ok
if
s
.
ok
{
p
.
ns
[
s
.
name
.
Local
]
=
s
.
name
.
Space
}
else
{
delete
(
p
.
ns
,
s
.
name
.
Local
)
}
}
}
return
true
return
true
...
...
test/nil.go
View file @
313c8224
...
@@ -150,7 +150,7 @@ func maptest() {
...
@@ -150,7 +150,7 @@ func maptest() {
m
[
2
]
=
3
m
[
2
]
=
3
})
})
shouldPanic
(
func
()
{
shouldPanic
(
func
()
{
m
[
2
]
=
0
,
false
delete
(
m
,
2
)
})
})
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment