Skip to content

Commit f19fd79

Browse files
committed
Merge branch 'master' of https://github.com/golang/go into invalid-char-url-scheme
2 parents df100b7 + 8f85424 commit f19fd79

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2101
-941
lines changed

AUTHORS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ Eivind Uggedal <[email protected]>
418418
Elbert Fliek <[email protected]>
419419
Eldar Rakhimberdin <[email protected]>
420420
Elena Grahovac <[email protected]>
421-
Elias Naur <[email protected]>
421+
422422
Elliot Morrison-Reed <[email protected]>
423423
Emerson Lin <[email protected]>
424424
Emil Hessman <[email protected]>
@@ -1304,6 +1304,7 @@ Sven Almgren <[email protected]>
13041304
Sylvain Zimmer <[email protected]>
13051305
Syohei YOSHIDA <[email protected]>
13061306
Szabolcs Nagy <[email protected]>
1307+
Taavi Kivisik <[email protected]>
13071308
Tad Fisher <[email protected]>
13081309
Tad Glines <[email protected]>
13091310
Taj Khattra <[email protected]>

CONTRIBUTORS

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
# Please keep the list sorted.
2626

2727
Aamir Khan <[email protected]>
28+
Aaron Cannon <[email protected]>
2829
Aaron France <[email protected]>
2930
Aaron Jacobs <[email protected]>
3031
Aaron Kemp <[email protected]>
@@ -188,6 +189,7 @@ Andy Finkenstadt <[email protected]>
188189
Andy Lindeman <[email protected]>
189190
Andy Maloney <[email protected]>
190191
Andy Walker <[email protected]>
192+
Andzej Maciusovic <[email protected]>
191193
Anfernee Yongkun Gui <[email protected]>
192194
Angelo Bulfone <[email protected]>
193195
Anh Hai Trinh <[email protected]>
@@ -553,6 +555,7 @@ Dong-hee Na <[email protected]>
553555
Donovan Hide <[email protected]>
554556
Doug Anderson <[email protected]>
555557
Doug Fawley <[email protected]>
558+
Douglas Danger Manley <[email protected]>
556559
Drew Flower <[email protected]>
557560
Drew Hintz <[email protected]>
558561
Duncan Holm <[email protected]>
@@ -575,7 +578,7 @@ Eivind Uggedal <[email protected]>
575578
Elbert Fliek <[email protected]>
576579
Eldar Rakhimberdin <[email protected]>
577580
Elena Grahovac <[email protected]>
578-
Elias Naur <[email protected]>
581+
579582
Elliot Morrison-Reed <[email protected]>
580583
Emerson Lin <[email protected]>
581584
Emil Hessman <[email protected]>
@@ -633,6 +636,7 @@ Fannie Zhang <[email protected]>
633636
Fatih Arslan <[email protected]>
634637
Fazal Majid <[email protected]>
635638
Fazlul Shahriar <[email protected]>
639+
Federico Bond <[email protected]>
636640
Federico Simoncelli <[email protected]>
637641
Fedor Indutny <[email protected]>
638642
Felipe Oliveira <[email protected]>
@@ -661,6 +665,7 @@ Frederik Ring <[email protected]>
661665
Fredrik Enestad <[email protected]>
662666
Fredrik Forsmo <[email protected]>
663667
Fredrik Wallgren <[email protected]>
668+
Frew Schmidt <[email protected]>
664669
665670
Frits van Bommel <[email protected]>
666671
Fumitoshi Ukai <[email protected]>
@@ -714,8 +719,9 @@ GitHub User @mkishere (224617) <[email protected]>
714719
GitHub User @OlgaVlPetrova (44112727) <[email protected]>
715720
GitHub User @pityonline (438222) <[email protected]>
716721
GitHub User @pytimer (17105586) <[email protected]>
722+
GitHub User @saitarunreddy (21041941) <[email protected]>
717723
GitHub User @shogo-ma (9860598) <[email protected]>
718-
GitHub User @tkivisik (13732144) <taavi.kivisik@gmail.com>
724+
GitHub User @tell-k (26263) <ffk2005@gmail.com>
719725
GitHub User @uhei (2116845) <[email protected]>
720726
GitHub User @uropek (39370426) <[email protected]>
721727
Giulio Iotti <[email protected]>
@@ -733,6 +739,7 @@ Greg Steuck <[email protected]>
733739
Greg Ward <[email protected]>
734740
Grégoire Delattre <[email protected]>
735741
Gregory Man <[email protected]>
742+
Guilherme Caruso <[email protected]>
736743
Guilherme Garnier <[email protected]>
737744
Guilherme Goncalves <[email protected]>
738745
Guilherme Rezende <[email protected]>
@@ -895,6 +902,7 @@ Jason Wangsadinata <[email protected]>
895902
Javier Kohen <[email protected]>
896903
Javier Segura <[email protected]>
897904
Jay Conrod <[email protected]>
905+
Jay Taylor <[email protected]>
898906
Jay Weisskopf <[email protected]>
899907
Jean de Klerk <[email protected]>
900908
Jean-André Santoni <[email protected]>
@@ -1020,13 +1028,15 @@ Jostein Stuhaug <[email protected]>
10201028
JP Sugarbroad <[email protected]>
10211029
10221030
Juan Carlos <[email protected]>
1031+
Juan Pablo Civile <[email protected]>
10231032
Jude Pereira <[email protected]>
10241033
Jukka-Pekka Kekkonen <[email protected]>
10251034
Julia Hansbrough <[email protected]>
10261035
Julian Kornberger <[email protected]>
10271036
Julian Pastarmov <[email protected]>
10281037
Julian Phillips <[email protected]>
10291038
Julie Qiu <[email protected]>
1039+
Julien Kauffmann <[email protected]>
10301040
Julien Salleyron <[email protected]>
10311041
Julien Schmidt <[email protected]>
10321042
Julio Montes <[email protected]>
@@ -1282,6 +1292,7 @@ Maxim Ushakov <[email protected]>
12821292
Maxime de Roucy <[email protected]>
12831293
Máximo Cuadros Ortiz <[email protected]>
12841294
Maxwell Krohn <[email protected]>
1295+
Maya Rashish <[email protected]>
12851296
Mayank Kumar <[email protected]>
12861297
Meir Fischer <[email protected]>
12871298
Meng Zhuo <[email protected]>
@@ -1458,6 +1469,7 @@ Pallat Anchaleechamaikorn <[email protected]>
14581469
Paolo Giarrusso <[email protected]>
14591470
Paolo Martini <[email protected]>
14601471
Parker Moore <[email protected]>
1472+
Parminder Singh <[email protected]>
14611473
Pascal S. de Kloe <[email protected]>
14621474
Pat Moroney <[email protected]>
14631475
Patrick Crosby <[email protected]>
@@ -1504,6 +1516,7 @@ Peter Armitage <[email protected]>
15041516
Peter Bourgon <[email protected]>
15051517
Peter Collingbourne <[email protected]>
15061518
Peter Conerly <[email protected]>
1519+
Peter Dotchev <[email protected]>
15071520
Peter Froehlich <[email protected]>
15081521
Peter Gonda <[email protected]>
15091522
Peter Hoyes <[email protected]>
@@ -1554,6 +1567,7 @@ Quentin Perez <[email protected]>
15541567
Quentin Renard <[email protected]>
15551568
Quentin Smith <[email protected]>
15561569
Quinn Slack <[email protected]>
1570+
Quinten Yearsley <[email protected]>
15571571
Quoc-Viet Nguyen <[email protected]>
15581572
Radek Sohlich <[email protected]>
15591573
Radu Berinde <[email protected]>
@@ -1627,6 +1641,7 @@ Ron Hashimoto <[email protected]>
16271641
Ron Minnich <[email protected]>
16281642
Ross Chater <[email protected]>
16291643
1644+
Ross Smith II <[email protected]>
16301645
Rowan Marshall <[email protected]>
16311646
Rowan Worth <[email protected]>
16321647
Rudi Kramer <[email protected]>
@@ -1681,13 +1696,17 @@ Scott Mansfield <[email protected]>
16811696
Scott Schwartz <[email protected]>
16821697
Scott Van Woudenberg <[email protected]>
16831698
Sean Burford <[email protected]>
1699+
Sean Chen <[email protected]>
16841700
Sean Chittenden <[email protected]>
16851701
Sean Christopherson <[email protected]>
16861702
Sean Dolphin <[email protected]>
16871703
Sean Harger <[email protected]>
16881704
Sean Rees <[email protected]>
1705+
Sebastiaan van Stijn <[email protected]>
1706+
Sebastian Schmidt <[email protected]>
16891707
Sebastien Binet <[email protected]>
16901708
Sébastien Paolacci <[email protected]>
1709+
Sebastien Williams-Wynn <[email protected]>
16911710
Seiji Takahashi <[email protected]>
16921711
Sergei Skorobogatov <[email protected]>
16931712
Sergey 'SnakE' Gromov <[email protected]>
@@ -1773,6 +1792,7 @@ Sven Blumenstein <[email protected]>
17731792
Sylvain Zimmer <[email protected]>
17741793
Syohei YOSHIDA <[email protected]>
17751794
Szabolcs Nagy <[email protected]>
1795+
Taavi Kivisik <[email protected]>
17761796
Tad Fisher <[email protected]>
17771797
Tad Glines <[email protected]>
17781798
Tadas Valiukas <[email protected]>
@@ -1889,6 +1909,7 @@ Val Polouchkine <[email protected]>
18891909
Vega Garcia Luis Alfonso <[email protected]>
18901910
Venil Noronha <[email protected]>
18911911
Veselkov Konstantin <[email protected]>
1912+
Viacheslav Poturaev <[email protected]>
18921913
Victor Chudnovsky <[email protected]>
18931914
Victor Vrantchan <[email protected]>
18941915
Vignesh Ramachandra <[email protected]>
@@ -1962,6 +1983,7 @@ Yestin Sun <[email protected]>
19621983
Yesudeep Mangalapilly <[email protected]>
19631984
Yissakhar Z. Beck <[email protected]>
19641985
Yo-An Lin <[email protected]>
1986+
Yohei Takeda <[email protected]>
19651987
Yongjian Xu <[email protected]>
19661988
Yorman Arias <[email protected]>
19671989

doc/go1.12.html

Lines changed: 69 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,18 @@ <h3 id="vet"><code>go tool vet</code> no longer supported</h3>
113113
</pre>
114114
</p>
115115

116+
<h3 id="tour">Tour</h3>
117+
118+
<p> <!-- CL 152657 -->
119+
The Go tour is no longer included in the main binary distribution. To
120+
run the tour locally, instead of running <code>go</code> <code>tool</code> <code>tour</code>,
121+
manually install it:
122+
<pre>
123+
go install golang.org/x/tour
124+
tour
125+
</pre>
126+
</p>
127+
116128
<h3 id="gocache">Build cache requirement</h3>
117129

118130
<p>
@@ -139,6 +151,12 @@ <h3 id="cgo">Cgo</h3>
139151
for more information.
140152
</p>
141153

154+
<p><!-- CL 152657 -->
155+
Mangled C names are no longer accepted in packages that use Cgo. Use the Cgo
156+
names instead. For example, use the documented cgo name <code>C.char</code>
157+
rather than the mangled name <code>_Ctype_char</code> that cgo generates.
158+
</p>
159+
142160
<h3 id="modules">Modules</h3>
143161

144162
<p><!-- CL 148517 -->
@@ -163,10 +181,10 @@ <h3 id="modules">Modules</h3>
163181

164182
<p><!-- CL 147282, 147281 -->
165183
The <code>go</code> directive in a <code>go.mod</code> file now indicates the
166-
version of the language used by the files within that module, and
167-
<code>go</code> <code>mod</code> <code>tidy</code> sets it to the
168-
current release (<code>go</code> <code>1.12</code>) if no existing
169-
version is present.
184+
version of the language used by the files within that module.
185+
It will be set to the current release
186+
(<code>go</code> <code>1.12</code>) if no existing version is
187+
present.
170188
If the <code>go</code> directive for a module specifies a
171189
version <em>newer</em> than the toolchain in use, the <code>go</code> command
172190
will attempt to build the packages regardless, and will note the mismatch only if
@@ -226,6 +244,23 @@ <h3 id="compiler">Compiler toolchain</h3>
226244
</pre>
227245
</p>
228246

247+
<p><!-- CL 153477 -->
248+
Wrappers generated by the compiler to implement method expressions
249+
are no longer reported
250+
by <a href="/pkg/runtime/#CallersFrames"><code>runtime.CallersFrames</code></a>
251+
and <a href="/pkg/runtime/#Stack"><code>runtime.Stack</code></a>. They
252+
are also not printed in panic stack traces.
253+
254+
This change aligns the <code>gc</code> toolchain to match
255+
the <code>gccgo</code> toolchain, which already elided such wrappers
256+
from stack traces.
257+
258+
Clients of these APIs might need to adjust for the missing
259+
frames. For code that must interoperate between 1.11 and 1.12
260+
releases, you can replace the method expression <code>x.M</code>
261+
with the function literal <code>func (...) { x.M(...) } </code>.
262+
</p>
263+
229264
<p><!-- CL 144340 -->
230265
The compiler now accepts a <code>-lang</code> flag to set the Go language
231266
version to use. For example, <code>-lang=go1.8</code> causes the compiler to
@@ -239,9 +274,9 @@ <h3 id="compiler">Compiler toolchain</h3>
239274
except for calls that simultaneously cross between Go and
240275
assembly <em>and</em> cross a package boundary. If linking results
241276
in an error like "relocation target not defined for ABIInternal (but
242-
is defined for ABI0)", please refer to help section of the ABI
243-
design document.
244-
<!-- TODO(austin): Link to the design doc. -->
277+
is defined for ABI0)", please refer to the
278+
<a href="https://github.com/golang/proposal/blob/master/design/27539-internal-abi.md#compatibility">compatibility section</a>
279+
of the ABI design document.
245280
</p>
246281

247282
<p><!-- CL 145179 -->
@@ -276,6 +311,11 @@ <h3 id="godoc"><code>godoc</code> and <code>go</code> <code>doc</code></h3>
276311
as the <code>godoc</code> command line used to do.
277312
</p>
278313

314+
<p><!-- CL 140959 -->
315+
<code>go</code> <code>doc</code> also now includes the <code>-src</code> flag,
316+
which will show the target's source code.
317+
</p>
318+
279319
<h3 id="trace">Trace</h3>
280320

281321
<p><!-- CL 60790 -->
@@ -329,6 +369,19 @@ <h2 id="runtime">Runtime</h2>
329369
yet supported on Windows.
330370
</p>
331371

372+
<p><!-- CL 158337 -->
373+
Go 1.12 improves the accuracy of memory profiles by fixing
374+
overcounting of large heap allocations.
375+
</p>
376+
377+
<p><!-- CL 159717 -->
378+
Tracebacks, <code>runtime.Caller</code>,
379+
and <code>runtime.Callers</code> no longer include
380+
compiler-generated initialization functions. Doing a traceback
381+
during the initialization of a global variable will now show a
382+
function named <code>PKG.init.ializers</code>.
383+
</p>
384+
332385
<h2 id="library">Core library</h2>
333386

334387
<h3 id="tls_1_3">TLS 1.3</h3>
@@ -438,7 +491,9 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
438491
<dd>
439492
<p><!-- CL 146258 -->
440493
TLS 1.2 clients and servers will now advertise and accept RSA-PSS
441-
signature algorithms for use with regular RSA public keys.
494+
signature algorithms for use with regular RSA public keys. Certain
495+
insecure certificate keys (including 512-bit RSA keys) will
496+
now cause a handshake failure if RSA-PSS is selected.
442497
</p>
443498

444499
<p><!-- CL 143177 -->
@@ -844,6 +899,12 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
844899
<code>executing "tmpl" at <.very.deep.context.value.notpresent>: map has no entry for key "notpresent"</code>
845900
</p>
846901

902+
<dd>
903+
<p><!-- CL 143097 -->
904+
If a user-defined function called by a template panics, the
905+
panic is now caught and returned as an error by
906+
the <code>Execute</code> or <code>ExecuteTemplate</code> method.
907+
</p>
847908
</dl><!-- text/template -->
848909

849910
<dl id="unsafe"><dt><a href="/pkg/unsafe/">unsafe</a></dt>

doc/install.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,39 @@ <h2 id="testing">Test your installation</h2>
271271
</p>
272272

273273

274+
<h2 id="extra_versions">Installing extra Go versions</h2>
275+
276+
<p>
277+
It may be useful to have multiple Go versions installed on the same machine, for
278+
example, to ensure that a package's tests pass on multiple Go versions.
279+
Once you have one Go version installed, you can install another (such as 1.10.7)
280+
as follows:
281+
</p>
282+
283+
<pre>
284+
$ go get golang.org/dl/go1.10.7
285+
$ go1.10.7 download
286+
</pre>
287+
288+
<p>
289+
The newly downloaded version can be used like <code>go</code>:
290+
</p>
291+
292+
<pre>
293+
$ go1.10.7 version
294+
go version go1.10.7 linux/amd64
295+
</pre>
296+
297+
<p>
298+
All Go versions available via this method are listed on
299+
<a href="https://godoc.org/golang.org/dl#pkg-subdirectories">the download page</a>.
300+
You can find where each of these extra Go versions is installed by looking
301+
at its <code>GOROOT</code>; for example, <code>go1.10.7 env GOROOT</code>.
302+
To uninstall a downloaded version, just remove its <code>GOROOT</code> directory
303+
and the <code>goX.Y.Z</code> binary.
304+
</p>
305+
306+
274307
<h2 id="uninstall">Uninstalling Go</h2>
275308

276309
<p>

misc/cgo/test/issue29748.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2019 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// Error handling a struct initializer that requires pointer checking.
6+
// Compilation test only, nothing to run.
7+
8+
package cgotest
9+
10+
// typedef struct { char **p; } S29748;
11+
// static int f29748(S29748 *p) { return 0; }
12+
import "C"
13+
14+
var Vissue29748 = C.f29748(&C.S29748{
15+
nil,
16+
})
17+
18+
func Fissue299748() {
19+
C.f29748(&C.S29748{
20+
nil,
21+
})
22+
}

0 commit comments

Comments
 (0)