1
0
mirror of https://github.com/golang/go synced 2024-09-30 05:24:29 -06:00
Commit Graph

29351 Commits

Author SHA1 Message Date
Alex Brainman
fca3dd3718 syscall: avoid convT2I allocs for ERROR_IO_PENDING instead of WSAEINPROGRESS
CL 28484 mistakenly assumed that WSARecv returns WSAEINPROGRESS
when there is nothing to read. But the error is ERROR_IO_PENDING.
Fix that mistake.

I was about to write a test for it. But I have found
TestTCPReadWriteAllocs in net package that does nearly what I need,
but was conveniently disabled. So enable and extend the test.

Fixes #16988

Change-Id: I55e5cf8998a9cf29e92b398d702280bdf7d6fc85
Reviewed-on: https://go-review.googlesource.com/28990
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-11 01:42:30 +00:00
Josh Bleecher Snyder
f15915af4e cmd/vet: ignore printf failures in cmd
This is a temporary measure to work around #17057.
It will be reverted when #17057 is fixed.

Change-Id: I21c02f63f3530774c91065cfed5d9c566839ed9f
Reviewed-on: https://go-review.googlesource.com/28959
Reviewed-by: Rob Pike <r@golang.org>
2016-09-10 22:42:26 +00:00
Josh Bleecher Snyder
8e84a5dd47 cmd/vet/all/whitelist: add readme.txt
This was written for CL 27811,
but it got lost in the sea of new files.

Change-Id: I5c52cb23dda499b21a6bb32ed5c586779ccbc2f1
Reviewed-on: https://go-review.googlesource.com/28960
Reviewed-by: Rob Pike <r@golang.org>
2016-09-10 22:41:38 +00:00
Josh Bleecher Snyder
5de2e5b73e cmd/vet: add vet runner script for core
This CL adds a script to run vet on std and cmd.

There are a considerable number of false positives,
mostly from legitimate but unusual assembly in
the runtime and reflect packages.

There are also a few false positives that need fixes.
They are noted as such in the whitelists;
they're not worth holding this CL for.

The unsafe pointer check is disabled.
The false positive rate is just too high to be worth it.

There is no cmd/dist/test integration yet.
The tentative plan is that we'll check the local platform
during all.bash, and that there'll be a fast builder that
checks all platforms (to cover platforms that can't exec).

Fixes #11041

Change-Id: Iee4ed32b05447888368ed86088e3ed3771f84442
Reviewed-on: https://go-review.googlesource.com/27811
Reviewed-by: Rob Pike <r@golang.org>
2016-09-10 21:56:34 +00:00
Josh Bleecher Snyder
4cf95fda64 encoding/hex: fix example function name
Found by vet.

Change-Id: I556d87f853a734002f779b04ba5a3588a3117106
Reviewed-on: https://go-review.googlesource.com/28958
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-09-10 21:40:16 +00:00
Josh Bleecher Snyder
0e435347b1 cmd: fix format strings used with obj.Headtype
Found by vet. Introduced by CL 28853.

Change-Id: I3199e0cbdb1c512ba29eb7e4d5c1c98963f5a954
Reviewed-on: https://go-review.googlesource.com/28957
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-10 21:40:10 +00:00
Joonas Kuorilehto
f30598dd71 crypto/tls: Add mutex to protect KeyLogWriter
Concurrent use of tls.Config is allowed, and may lead to
KeyLogWriter being written to concurrently. Without a mutex
to protect it, corrupted output may occur. A mutex is added
for correctness.

The mutex is made global to save size of the config struct as
KeyLogWriter is rarely enabled.

Related to #13057.

Change-Id: I5ee55b6d8b43a191ec21f06e2aaae5002a71daef
Reviewed-on: https://go-review.googlesource.com/29016
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-09-10 21:31:48 +00:00
Josh Bleecher Snyder
c564aebce9 internal/testenv: add GoTool
GoToolPath requires a *testing.T to handle errors.
GoTool provides a variant that returns errors
for clients without a *testing.T,
such as that found in CL 27811.

Change-Id: I7ac8b7ec9d472894c37223c5f7b121ec823e7f61
Reviewed-on: https://go-review.googlesource.com/28787
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-09-10 20:50:12 +00:00
bogem
3d562de8e3 os: delete code duplications in error files
Change-Id: I1ec2fcf81a7a9e45a2fae8c02c8adabc7841b4fa
Reviewed-on: https://go-review.googlesource.com/29013
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-09-10 17:04:21 +00:00
Ian Lance Taylor
ca993d6797 builtin: clarify that make(map[K]V, n) allocates space for n elements
Change-Id: Id6265b6093edaa4be2c59e4799351082f7228b5d
Reviewed-on: https://go-review.googlesource.com/28815
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2016-09-10 12:57:37 +00:00
bogem
e273a27946 flag: use strconv instead of fmt in values' String funcs
The existing implementation of flag values with fmt package uses
more memory and works slower than the implementation with strconv
package.

Change-Id: I9e749179f66d5c50cafe98186641bcdbc546d2db
Reviewed-on: https://go-review.googlesource.com/28914
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-09-10 10:29:44 +00:00
Jaana Burcu Dogan
7b269195d3 cmd/go: organize test profiling flags into their own sub-section
Fixes #17020.

Change-Id: Ice21bd8eb4dbc208f244b275c3be604bc8e3efe7
Reviewed-on: https://go-review.googlesource.com/28783
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Jaana Burcu Dogan <jbd@google.com>
2016-09-10 00:35:48 +00:00
Edward Muller
81dfcba331 go/build: add help info for unset $GOPATH
We relay this info in a few places, in a few different ways, but not
consistently everywhere.  This led one of our users to start googling
and not find https://golang.org/doc/code.html#Workspaces, of which `go
help gopath` is the most equivalent.

Change-Id: I28a94375739f3aa4f200e145293ca2a5f65101e1
Reviewed-on: https://go-review.googlesource.com/28690
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2016-09-10 00:27:43 +00:00
Brad Fitzpatrick
1ff19201fd net/url: add URL.Hostname and URL.Port accessors
Fixes #16142

Change-Id: I7609faaf00c69646b0bd44a60a63a22d9265feb0
Reviewed-on: https://go-review.googlesource.com/28933
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Reviewed-by: Francesc Campoy Flores <campoy@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-09-09 22:55:42 +00:00
Brad Fitzpatrick
6e87082d41 net/http: make Client copy headers on redirect
Copy all of the original request's headers on redirect, unless they're
sensitive. Only send sensitive ones to the same origin, or subdomains
thereof.

Fixes #4800

Change-Id: Ie9fa75265c9d5e4c1012c028d31fd1fd74465712
Reviewed-on: https://go-review.googlesource.com/28930
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Reviewed-by: Francesc Campoy Flores <campoy@golang.org>
Reviewed-by: Ross Light <light@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-09-09 22:55:40 +00:00
Carlos C
1161a19c1e context: add examples
Add function level examples to the package.

Partially addresses #16360

Change-Id: I7162aed4e4a969743c19b79c9ffaf9217d2c1c08
Reviewed-on: https://go-review.googlesource.com/26930
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-09 22:50:41 +00:00
Robert Griesemer
d817c4ec6d cmd/compile: use regular rather than indexed format string
This enables the format test to process this file (the format
test doesn't handle indexed formats, and this is the only place
in the compiler where they occur).

Change-Id: I99743f20c463f181a589b210365f70162227d4e0
Reviewed-on: https://go-review.googlesource.com/28932
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2016-09-09 20:07:43 +00:00
Matthew Dempsky
cfc0d6d884 cmd/compile/internal/syntax: remove strbyteseql
cmd/compile already optimizes "string(b) == s" to avoid allocating a
temporary string.

Change-Id: I4244fbeae8d350261494135c357f9a6e2ab7ace3
Reviewed-on: https://go-review.googlesource.com/28931
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-09 19:25:56 +00:00
David Crawshaw
3877f820a6 cmd/link, etc: introduce SymKind type
Moves the grouping of symbol kinds (sections) into cmd/internal/obj
to keep it near the definition. Groundwork for CL 28538.

Change-Id: I99112981e69b028f366e1333f31cd7defd4ff82c
Reviewed-on: https://go-review.googlesource.com/28691
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-09-09 16:56:03 +00:00
David Crawshaw
791f71d192 cmd: use obj.GOOS, obj.GOARCH, etc
As cmd/internal/obj is coordinating the definition of GOOS, GOARCH,
etc across the compiler and linker, turn its functions into globals
and use them everywhere.

Change-Id: I5db5addda3c6b6435c37fd5581c7c3d9a561f492
Reviewed-on: https://go-review.googlesource.com/28854
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-09 16:38:45 +00:00
Tormod Erevik Lea
f2f374d125 reflect: update location of vet tool in comment
Change-Id: Ic5160edbbca4a8ffc7c7e6246e34fae1978470fd
Reviewed-on: https://go-review.googlesource.com/28912
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-09 15:02:46 +00:00
David Crawshaw
428c349552 cmd/link, cmd/internal/obj: give Headtype a type
Separate out windows/windowsgui properly so we are not encoding some
of the Headtype value in a separate headstring global.

Remove one of the two copies of the variable from cmd/link.

Remove duplicate string to headtype list.

Change-Id: Ifa20fb9652a1dc95161e154aac11f15ad0f709d0
Reviewed-on: https://go-review.googlesource.com/28853
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-09-09 12:25:00 +00:00
David Crawshaw
361d2738d5 cmd/link: remove the -shared flag
The -shared flag has been superseded by the -buildmode flag.

Change-Id: I3682cc0367b919084c280d7dc64746485c1d4ddd
Reviewed-on: https://go-review.googlesource.com/28852
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
2016-09-09 10:20:01 +00:00
Dhaivat Pandit
57d4e57635 net/http/cookiejar: added simple example test
Fixes #16884
Updates #16360

Change-Id: I01563031a1c105e54499134eed4789f6219f41ec
Reviewed-on: https://go-review.googlesource.com/27993
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-09-09 03:47:00 +00:00
Jack Lindamood
39382793d3 context: reduce memory usage of context tree
Modifies context package to use map[]struct{} rather than map[]bool,
since the map is intended as a set object.  Also adds Benchmarks to
the context package switching between different types of root nodes
and a tree with different depths.

Included below are bytes deltas between the old and new code, using
these benchmarks.

benchmark                                                       old bytes     new bytes     delta
BenchmarkContextCancelTree/depth=1/Root=Background-8            176           176           +0.00%
BenchmarkContextCancelTree/depth=1/Root=OpenCanceler-8          560           544           -2.86%
BenchmarkContextCancelTree/depth=1/Root=ClosedCanceler-8        352           352           +0.00%
BenchmarkContextCancelTree/depth=10/Root=Background-8           3632          3488          -3.96%
BenchmarkContextCancelTree/depth=10/Root=OpenCanceler-8         4016          3856          -3.98%
BenchmarkContextCancelTree/depth=10/Root=ClosedCanceler-8       1936          1936          +0.00%
BenchmarkContextCancelTree/depth=100/Root=Background-8          38192         36608         -4.15%
BenchmarkContextCancelTree/depth=100/Root=OpenCanceler-8        38576         36976         -4.15%
BenchmarkContextCancelTree/depth=100/Root=ClosedCanceler-8      17776         17776         +0.00%
BenchmarkContextCancelTree/depth=1000/Root=Background-8         383792        367808        -4.16%
BenchmarkContextCancelTree/depth=1000/Root=OpenCanceler-8       384176        368176        -4.16%
BenchmarkContextCancelTree/depth=1000/Root=ClosedCanceler-8     176176        176176        +0.00%

Change-Id: I699ad704d9f7b461214e1651d24941927315b525
Reviewed-on: https://go-review.googlesource.com/25270
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-09 02:30:22 +00:00
Brad Fitzpatrick
0ab6bb42e1 doc: clarify that any C compiler works for cgo
Currently the footnote says "gcc is required only if you plan to use cgo",
but the footnote was referenced from the text:

   "use the clang or gcc† that comes with Xcode‡ for cgo support"

That seems to imply that clang doesn't get you cgo support on OS X,
which isn't true. The update text matches what the install-source.html
page says.

Change-Id: Ib88464a0d138227d357033123f6675a77d5d777f
Reviewed-on: https://go-review.googlesource.com/28786
Reviewed-by: Minux Ma <minux@golang.org>
2016-09-09 02:30:07 +00:00
Nigel Tao
f782a7e075 image/draw: optimize drawFillOver as drawFillSrc for opaque fills.
Benchmarks are much better for opaque fills and slightly worse on non
opaque fills. I think that on balance, this is still a win.

When the source is uniform(color.RGBA{0x11, 0x22, 0x33, 0xff}):
name        old time/op  new time/op  delta
FillOver-8   966µs ± 1%    32µs ± 1%  -96.67%  (p=0.000 n=10+10)
FillSrc-8   32.4µs ± 1%  32.2µs ± 1%     ~      (p=0.053 n=9+10)

When the source is uniform(color.RGBA{0x11, 0x22, 0x33, 0x44}):
name        old time/op  new time/op  delta
FillOver-8   962µs ± 0%  1018µs ± 0%  +5.85%   (p=0.000 n=9+10)
FillSrc-8   32.2µs ± 1%  32.1µs ± 0%    ~     (p=0.148 n=10+10)

Change-Id: I52ec6d5fcd0fbc6710cef0e973a21ee7827c0dd9
Reviewed-on: https://go-review.googlesource.com/28790
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-09-09 01:17:26 +00:00
Robert Griesemer
06eeea210b cmd/compile: permit use of %S (short) and %L (long) instead of %1v and %2v
First step towards cleaning up format use. Not yet enabled.

Change-Id: Ia8d76bf02fe05882fffb9d17c9a30dc38d28bf81
Reviewed-on: https://go-review.googlesource.com/28784
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-09 00:44:03 +00:00
Michael Munday
d38d59ffb5 runtime: fix SIGILL in checkvectorfacility on s390x
STFLE does not necessarily write to all the double-words that are
requested. It is therefore necessary to clear the target memory
before calling STFLE in order to ensure that the facility list does
not contain false positives.

Fixes #17032.

Change-Id: I7bec9ade7103e747b72f08562fe57e6f091bd89f
Reviewed-on: https://go-review.googlesource.com/28850
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-09 00:34:22 +00:00
Cherry Zhang
14ff7cc94c runtime/cgo: fix callback on big-endian MIPS64
Use MOVW, instead of MOVV, to pass an int32 arg. Also no need to
restore arg registers.

Fix big-endian MIPS64 build.

Change-Id: Ib43c71075c988153e5e5c5c6e7297b3fee28652a
Reviewed-on: https://go-review.googlesource.com/28830
Reviewed-by: Minux Ma <minux@golang.org>
2016-09-09 00:30:28 +00:00
Jim Kingdon
2a36f78e87 doc: avoid mentioning non-existence of u flag to fmt.Printf.
It is better to document what golang does, rather than how it differs
from languages which readers may or may not know.

That the output format is based on the type is basically self-evident
if you consider this just in go terms.

Change-Id: I0223e9b4cb67cc83a9ebe4d424e6c151d7ed600f
Reviewed-on: https://go-review.googlesource.com/28393
Reviewed-by: Rob Pike <r@golang.org>
2016-09-09 00:04:21 +00:00
Dave Day
f27c1bda51 net/url: handle escaped paths in ResolveReference
Currently, path resolution is done using the un-escaped version of
paths. This means that path elements like one%2ftwo%2fthree are
handled incorrectly, and optional encodings (%2d vs. -) are dropped.

This function makes escaped handling consistent with Parse: provided
escapings are honoured, and RawPath is only set if necessary.

A helper method setPath is introduced to handle the correct setting of
Path and RawPath given the encoded path.

Fixes #16947

Change-Id: I40b1215e9066e88ec868b41635066eee220fde37
Reviewed-on: https://go-review.googlesource.com/28343
Run-TryBot: Dave Day <djd@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-08 23:14:16 +00:00
Robert Griesemer
29f18d7983 cmd/compile: fix bug in oconv
Introduced by https://go-review.googlesource.com/#/c/28331/ .

Change-Id: Id75aed6410f06b302d5347f6ca6a2e19c61f6fb6
Reviewed-on: https://go-review.googlesource.com/28779
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 22:01:55 +00:00
Robert Griesemer
9d6677ca7b cmd/compile: update and reenable Formats test
Change-Id: I9c0da13d21551dbf766156472224370ab9badfe9
Reviewed-on: https://go-review.googlesource.com/28778
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 22:01:37 +00:00
Robert Griesemer
58de26810c cmd/compile: remove superfluous returns in fmt.go
Change-Id: Ie73fb460a3838c6d1b9348965a8b69c1bfa6a882
Reviewed-on: https://go-review.googlesource.com/28341
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Dave Cheney <dave@cheney.net>
2016-09-08 21:36:37 +00:00
Robert Griesemer
0ca5f269d4 cmd/compile: remove fmt.go printer again, now that it's unused
Change-Id: I9a6e5b9cbcfc264c61fd39ed65330ca737707e1f
Reviewed-on: https://go-review.googlesource.com/28340
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 21:36:22 +00:00
Robert Griesemer
266c6223df cmd/compile: implement fmt.Formatter for Nodes formats %s, %v
Change-Id: Iac3a72cb6c5394f3c1a49f39125b0256d570e006
Reviewed-on: https://go-review.googlesource.com/28339
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 21:36:08 +00:00
Robert Griesemer
daf6179733 cmd/compile: use fmt.State in nodedump
Change-Id: Icd83e88fc879b30b34f8697d540619efeb25c25b
Reviewed-on: https://go-review.googlesource.com/28338
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 21:35:54 +00:00
Robert Griesemer
0510f0dfe7 cmd/compile: use fmt.State in exprfmt
Change-Id: If6c2d469c66a7aa8471bf54310354efdac3e0235
Reviewed-on: https://go-review.googlesource.com/28337
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 21:35:40 +00:00
Robert Griesemer
ebdc8faf04 cmd/compile: use fmt.State in nodefmt and stmtfmt
Change-Id: Iac87007af4ee268b45f11ec05bf4757f2e7eedd8
Reviewed-on: https://go-review.googlesource.com/28336
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 21:35:25 +00:00
Robert Griesemer
ff046d2e28 cmd/compile: implement fmt.Formatter for *Node formats %s, %v
Change-Id: I80ed668cdeab0c4342b734d34b429927e0213e5a
Reviewed-on: https://go-review.googlesource.com/28335
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 21:35:10 +00:00
Robert Griesemer
a0d2010208 cmd/compile: implement fmt.Formatter for *Sym formats %s, %v
Change-Id: I0c362edba66c763e84990e3c5508013021f3e6fe
Reviewed-on: https://go-review.googlesource.com/28334
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 21:34:55 +00:00
Robert Griesemer
8d0bbe2b48 cmd/compile: implement fmt.Formatter for *Type formats %s, %v
Change-Id: I878ac549430abc7859c30d176d52d52ce02c5827
Reviewed-on: https://go-review.googlesource.com/28333
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 21:34:41 +00:00
Robert Griesemer
97ba3c8242 cmd/compile: implement fmt.Formatter for Val formats %s, %v
Change-Id: Id56e886793161b48b445439e9a12109142064d3f
Reviewed-on: https://go-review.googlesource.com/28332
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 21:34:26 +00:00
Robert Griesemer
9e1f6a326e cmd/compile: implement fmt.Formatter for Op formats %s, %v
Change-Id: I59e18fab37fd688fc1e578e2192e32e29fdf37f0
Reviewed-on: https://go-review.googlesource.com/28331
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 21:34:11 +00:00
Robert Griesemer
adcd34c732 cmd/compile: implement fmt.Formatter for *Node formats %s, %v, %j
Change-Id: I44ee5843bb9dfd65b9a18091f365355e84888f21
Reviewed-on: https://go-review.googlesource.com/28330
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 21:33:52 +00:00
Robert Griesemer
b6948ce7c2 cmd/compile: temporarily disable Formats test
So we can submit a sequence of older changes that don't yet
update the formats in this file. We will then re-enable the
test with the updated formats.

Change-Id: I6ed559b83adc891bbf4b3d855a7dc1e428366f7f
Reviewed-on: https://go-review.googlesource.com/28776
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-08 21:15:26 +00:00
Emmanuel Odeke
141f1a0e24 encoding/hex: implement examples using all exported functions
Fixes #11254.
Updates #16360.

Implements examples using all exported functions.

This CL also updates Decode documentation to
state that only hexadecimal characters are accepted
in the source slice src, but also that the length
of src must be even.

Change-Id: Id016a4ba814f940cd300f26581fb4b9d2aded306
Reviewed-on: https://go-review.googlesource.com/28482
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-08 19:51:01 +00:00
Cherry Zhang
4354ffd38b cmd/compile: intrinsify Ctz, Bswap, and some atomics on ARM64
Change-Id: Ia5bf72b70e6f6522d6fb8cd050e78f862d37b5ae
Reviewed-on: https://go-review.googlesource.com/27936
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2016-09-08 19:45:25 +00:00
Sina Siadat
daa7c607d2 net/http/httputil: remove custom hop-by-hop headers from response in ReverseProxy
Hop-by-hop headers (explicitly mentioned in RFC 2616) were already
removed from the response. This removes the custom hop-by-hop
headers listed in the "Connection" header of the response.

Updates #16875

Change-Id: I6b8f261d38b8d72040722f3ded29755ef0303427
Reviewed-on: https://go-review.googlesource.com/28810
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-09-08 19:12:03 +00:00