Skip to content

Commit 4d68b14

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents bab252e + 236c567 commit 4d68b14

File tree

556 files changed

+26691
-35723
lines changed

Some content is hidden

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

556 files changed

+26691
-35723
lines changed

AUTHORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ Elena Grahovac <[email protected]>
353353
Elias Naur <[email protected]>
354354
Elliot Morrison-Reed <[email protected]>
355355
Emerson Lin <[email protected]>
356-
356+
Emil Hessman <[email protected]>
357357
Emilien Kenler <[email protected]>
358358
359359
Empirical Interfaces Inc.

CONTRIBUTORS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ Elena Grahovac <[email protected]>
473473
Elias Naur <[email protected]>
474474
Elliot Morrison-Reed <[email protected]>
475475
Emerson Lin <[email protected]>
476-
476+
Emil Hessman <[email protected]>
477477
Emilien Kenler <[email protected]>
478478
479479
Eoghan Sherry <[email protected]>
@@ -641,7 +641,7 @@ Ingo Krabbe <[email protected]>
641641
642642
Irieda Noboru <[email protected]>
643643
Isaac Wagner <[email protected]>
644-
Iskander Sharipov <[email protected]>
644+
645645
Ivan Babrou <[email protected]>
646646
Ivan Bertona <[email protected]>
647647
Ivan Krasin <[email protected]>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ in your web browser for source installation instructions.
3131

3232
### Contributing
3333

34-
Go is the work of hundreds of contributors. We appreciate your help!
34+
Go is the work of thousands of contributors. We appreciate your help!
3535

3636
To contribute, please read the contribution guidelines:
3737
https://golang.org/doc/contribute.html

api/README

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ compatibility.
1111
next.txt is the only file intended to be mutated. It's a list of
1212
features that may be added to the next version. It only affects
1313
warning output from the go api tool.
14-

api/except.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ pkg encoding/json, method (*RawMessage) MarshalJSON() ([]uint8, error)
22
pkg math/big, const MaxBase = 36
33
pkg math/big, type Word uintptr
44
pkg net, func ListenUnixgram(string, *UnixAddr) (*UDPConn, error)
5+
pkg os, const ModeType = 2399141888
56
pkg os (linux-arm), const O_SYNC = 4096
67
pkg os (linux-arm-cgo), const O_SYNC = 4096
78
pkg syscall (darwin-386), const ImplementsGetwd = false
@@ -361,3 +362,24 @@ pkg syscall (openbsd-386-cgo), const SYS_KILL = 37
361362
pkg syscall (openbsd-amd64), const SYS_KILL = 37
362363
pkg syscall (openbsd-amd64-cgo), const SYS_KILL = 37
363364
pkg unicode, const Version = "9.0.0"
365+
pkg text/template/parse, method (*VariableNode) Copy() Node
366+
pkg text/template/parse, method (*VariableNode) String() string
367+
pkg text/template/parse, method (VariableNode) Position() Pos
368+
pkg text/template/parse, method (VariableNode) Type() NodeType
369+
pkg text/template/parse, type PipeNode struct, Decl []*VariableNode
370+
pkg text/template/parse, type VariableNode struct
371+
pkg text/template/parse, type VariableNode struct, Ident []string
372+
pkg text/template/parse, type VariableNode struct, embedded NodeType
373+
pkg text/template/parse, type VariableNode struct, embedded Pos
374+
pkg syscall (windows-386), type CertChainPolicyPara struct, ExtraPolicyPara uintptr
375+
pkg syscall (windows-386), type CertChainPolicyStatus struct, ExtraPolicyStatus uintptr
376+
pkg syscall (windows-386), type CertContext struct, CertInfo uintptr
377+
pkg syscall (windows-386), type CertRevocationInfo struct, CrlInfo uintptr
378+
pkg syscall (windows-386), type CertRevocationInfo struct, OidSpecificInfo uintptr
379+
pkg syscall (windows-386), type CertSimpleChain struct, TrustListInfo uintptr
380+
pkg syscall (windows-amd64), type CertChainPolicyPara struct, ExtraPolicyPara uintptr
381+
pkg syscall (windows-amd64), type CertChainPolicyStatus struct, ExtraPolicyStatus uintptr
382+
pkg syscall (windows-amd64), type CertContext struct, CertInfo uintptr
383+
pkg syscall (windows-amd64), type CertRevocationInfo struct, CrlInfo uintptr
384+
pkg syscall (windows-amd64), type CertRevocationInfo struct, OidSpecificInfo uintptr
385+
pkg syscall (windows-amd64), type CertSimpleChain struct, TrustListInfo uintptr

doc/contribute.html

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -579,13 +579,14 @@ <h2 id="commit_messages">Writing good commit messages</h2>
579579

580580
Fixes #159
581581
</pre>
582+
582583
</p>
583584

584585
<h3>First line</h3>
585586

586587
<p>
587-
The first line of the change description is conventionally a one-line
588-
summary of the change, prefixed by the primary affected package.</p>
588+
The first line of the change description is conventionally a short one-line
589+
summary of the change, prefixed by the primary affected package.
589590

590591
<p>It should be written so to complete the sentence "This change modifies Go to _____."</p>
591592

@@ -595,7 +596,7 @@ <h3>Main content</h3>
595596
change and explain what it does.
596597
Write in complete sentences with correct punctuation, just like
597598
for your comments in Go.
598-
If there is a helpful reference, mention it here.
599+
Don't use HTML, Markdown, or any other markup language.
599600
</p>
600601

601602
<h3>Referencing issues</h3>
@@ -621,10 +622,6 @@ <h3>Referencing issues</h3>
621622
</p>
622623

623624

624-
625-
626-
627-
628625
<h2 id="review">The review process</h2>
629626

630627
<p>

doc/devel/release.html

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ <h2 id="policy">Release Policy</h2>
1616

1717
<p>
1818
Each major Go release is supported until there are two newer major releases.
19-
For example, Go 1.8 is supported until Go 1.10 is released,
20-
and Go 1.9 is supported until Go 1.11 is released.
19+
For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was
20+
supported until the Go 1.8 release.
2121
We fix critical problems, including <a href="/security">critical security problems</a>,
2222
in supported releases as needed by issuing minor revisions
23-
(for example, Go 1.9.1, Go 1.9.2, and so on).
23+
(for example, Go 1.6.1, Go 1.6.2, and so on).
2424
</p>
2525

2626
<h2 id="go1.10">go1.10 (released 2018/02/16)</h2>
@@ -30,6 +30,17 @@ <h2 id="go1.10">go1.10 (released 2018/02/16)</h2>
3030
Read the <a href="/doc/go1.10">Go 1.10 Release Notes</a> for more information.
3131
</p>
3232

33+
<h3 id="go1.10.minor">Minor revisions</h3>
34+
35+
<p>
36+
go1.10.1 (released 2018/03/28) includes fixes to the compiler, runtime, and the
37+
<code>archive/zip</code>, <code>crypto/tls</code>, <code>crypto/x509</code>,
38+
<code>encoding/json</code>, <code>net</code>, <code>net/http</code>, and
39+
<code>net/http/pprof</code> packages.
40+
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.10.1">Go
41+
1.10.1 milestone</a> on our issue tracker for details.
42+
</p>
43+
3344
<h2 id="go1.9">go1.9 (released 2017/08/24)</h2>
3445

3546
<p>
@@ -70,6 +81,13 @@ <h3 id="go1.9.minor">Minor revisions</h3>
7081
1.9.4</a> milestone on our issue tracker for details.
7182
</p>
7283

84+
<p>
85+
go1.9.5 (released 2018/03/28) includes fixes to the compiler, go command, and
86+
<code>net/http/pprof</code> package.
87+
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.9.5">Go
88+
1.9.5 milestone</a> on our issue tracker for details.
89+
</p>
90+
7391
<h2 id="go1.8">go1.8 (released 2017/02/16)</h2>
7492

7593
<p>

doc/install-source.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ <h2 id="testing">Testing your installation</h2>
307307
import "fmt"
308308

309309
func main() {
310-
fmt.Printf("hello, world\n")
310+
fmt.Printf("hello, world\n")
311311
}
312312
</pre>
313313

doc/install.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ <h3 id="tarball">Linux, Mac OS X, and FreeBSD tarballs</h3>
106106
export PATH=$PATH:/usr/local/go/bin
107107
</pre>
108108

109+
<p>
110+
<b>Note</b>: changes made to a <code>profile</code> file may not apply until the
111+
next time you log into your computer.
112+
To apply the changes immediately, just run the shell commands directly
113+
or execute them from the profile using a command such as
114+
<code>source $HOME/.profile</code>.
115+
</p>
116+
109117
<h4 id="tarball_non_standard">Installing to a custom location</h4>
110118

111119
<p>
@@ -236,7 +244,7 @@ <h2 id="testing">Test your installation</h2>
236244
import "fmt"
237245

238246
func main() {
239-
fmt.Printf("hello, world\n")
247+
fmt.Printf("hello, world\n")
240248
}
241249
</pre>
242250

@@ -278,7 +286,7 @@ <h2 id="testing">Test your installation</h2>
278286
<p>
279287
You can run <code>go</code> <code>install</code> to install the binary into
280288
your workspace's <code>bin</code> directory
281-
or <code>go</code> <code>clean</code> to remove it.
289+
or <code>go</code> <code>clean</code> <code>-i</code> to remove it.
282290
</p>
283291

284292
<p>

misc/ios/detect.go

Lines changed: 29 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ package main
1414

1515
import (
1616
"bytes"
17+
"crypto/x509"
1718
"fmt"
1819
"io/ioutil"
1920
"os"
@@ -22,20 +23,21 @@ import (
2223
)
2324

2425
func main() {
25-
devID := detectDevID()
26+
udids := getLines(exec.Command("idevice_id", "-l"))
27+
if len(udids) == 0 {
28+
fail("no udid found; is a device connected?")
29+
}
2630

27-
udid := detectUDID()
28-
mps := detectMobileProvisionFiles(udid)
31+
mps := detectMobileProvisionFiles(udids)
2932
if len(mps) == 0 {
30-
fail("did not find mobile provision matching device udid %s", udid)
33+
fail("did not find mobile provision matching device udids %q", udids)
3134
}
3235

3336
fmt.Println("Available provisioning profiles below.")
3437
fmt.Println("NOTE: Any existing app on the device with the app id specified by GOIOS_APP_ID")
3538
fmt.Println("will be overwritten when running Go programs.")
3639
for _, mp := range mps {
3740
fmt.Println()
38-
fmt.Printf("export GOIOS_DEV_ID=%s\n", devID)
3941
f, err := ioutil.TempFile("", "go_ios_detect_")
4042
check(err)
4143
fname := f.Name()
@@ -46,6 +48,12 @@ func main() {
4648
check(err)
4749
check(f.Close())
4850

51+
cert, err := plistExtract(fname, "DeveloperCertificates:0")
52+
check(err)
53+
pcert, err := x509.ParseCertificate(cert)
54+
check(err)
55+
fmt.Printf("export GOIOS_DEV_ID=\"%s\"\n", pcert.Subject.CommonName)
56+
4957
appID, err := plistExtract(fname, "Entitlements:application-identifier")
5058
check(err)
5159
fmt.Printf("export GOIOS_APP_ID=%s\n", appID)
@@ -56,39 +64,7 @@ func main() {
5664
}
5765
}
5866

59-
func detectDevID() string {
60-
cmd := exec.Command("security", "find-identity", "-p", "codesigning", "-v")
61-
lines := getLines(cmd)
62-
63-
for _, line := range lines {
64-
if !bytes.Contains(line, []byte("iPhone Developer")) {
65-
continue
66-
}
67-
if bytes.Contains(line, []byte("REVOKED")) {
68-
continue
69-
}
70-
fields := bytes.Fields(line)
71-
return string(fields[1])
72-
}
73-
fail("no code signing identity found")
74-
panic("unreachable")
75-
}
76-
77-
var udidPrefix = []byte("UniqueDeviceID: ")
78-
79-
func detectUDID() []byte {
80-
cmd := exec.Command("ideviceinfo")
81-
lines := getLines(cmd)
82-
for _, line := range lines {
83-
if bytes.HasPrefix(line, udidPrefix) {
84-
return bytes.TrimPrefix(line, udidPrefix)
85-
}
86-
}
87-
fail("udid not found; is the device connected?")
88-
panic("unreachable")
89-
}
90-
91-
func detectMobileProvisionFiles(udid []byte) []string {
67+
func detectMobileProvisionFiles(udids [][]byte) []string {
9268
cmd := exec.Command("mdfind", "-name", ".mobileprovision")
9369
lines := getLines(cmd)
9470

@@ -98,11 +74,17 @@ func detectMobileProvisionFiles(udid []byte) []string {
9874
continue
9975
}
10076
xmlLines := getLines(parseMobileProvision(string(line)))
101-
for _, xmlLine := range xmlLines {
102-
if bytes.Contains(xmlLine, udid) {
103-
files = append(files, string(line))
77+
matches := 0
78+
for _, udid := range udids {
79+
for _, xmlLine := range xmlLines {
80+
if bytes.Contains(xmlLine, udid) {
81+
matches++
82+
}
10483
}
10584
}
85+
if matches == len(udids) {
86+
files = append(files, string(line))
87+
}
10688
}
10789
return files
10890
}
@@ -121,7 +103,12 @@ func plistExtract(fname string, path string) ([]byte, error) {
121103

122104
func getLines(cmd *exec.Cmd) [][]byte {
123105
out := output(cmd)
124-
return bytes.Split(out, []byte("\n"))
106+
lines := bytes.Split(out, []byte("\n"))
107+
// Skip the empty line at the end.
108+
if len(lines[len(lines)-1]) == 0 {
109+
lines = lines[:len(lines)-1]
110+
}
111+
return lines
125112
}
126113

127114
func output(cmd *exec.Cmd) []byte {

misc/ios/go_darwin_arm_exec.go

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ func main() {
9494
log.Fatal(err)
9595
}
9696

97+
appdir := filepath.Join(tmpdir, "gotest.app")
98+
os.RemoveAll(appdir)
99+
100+
if err := assembleApp(appdir, os.Args[1]); err != nil {
101+
log.Fatal(err)
102+
}
103+
97104
// This wrapper uses complicated machinery to run iOS binaries. It
98105
// works, but only when running one binary at a time.
99106
// Use a file lock to make sure only one wrapper is running at a time.
@@ -108,6 +115,7 @@ func main() {
108115
if err := syscall.Flock(int(lock.Fd()), syscall.LOCK_EX); err != nil {
109116
log.Fatal(err)
110117
}
118+
111119
// Approximately 1 in a 100 binaries fail to start. If it happens,
112120
// try again. These failures happen for several reasons beyond
113121
// our control, but all of them are safe to retry as they happen
@@ -118,7 +126,7 @@ func main() {
118126
if i > 0 {
119127
fmt.Fprintln(os.Stderr, "start timeout, trying again")
120128
}
121-
err = run(os.Args[1], os.Args[2:])
129+
err = run(appdir, os.Args[2:])
122130
if err == nil || err != errRetry {
123131
break
124132
}
@@ -140,9 +148,7 @@ func getenv(envvar string) string {
140148
return s
141149
}
142150

143-
func run(bin string, args []string) (err error) {
144-
appdir := filepath.Join(tmpdir, "gotest.app")
145-
os.RemoveAll(appdir)
151+
func assembleApp(appdir, bin string) error {
146152
if err := os.MkdirAll(appdir, 0755); err != nil {
147153
return err
148154
}
@@ -182,7 +188,10 @@ func run(bin string, args []string) (err error) {
182188
if err := cmd.Run(); err != nil {
183189
return fmt.Errorf("codesign: %v", err)
184190
}
191+
return nil
192+
}
185193

194+
func run(appdir string, args []string) (err error) {
186195
oldwd, err := os.Getwd()
187196
if err != nil {
188197
return err
@@ -259,11 +268,9 @@ func run(bin string, args []string) (err error) {
259268
}
260269

261270
started = true
262-
263-
s.doCmd("run", "stop reason = signal SIGINT", 20*time.Second)
264-
265271
startTestsLen := s.out.Len()
266-
fmt.Fprintln(s.in, `process continue`)
272+
273+
fmt.Fprintln(s.in, "run")
267274

268275
passed := func(out *buf) bool {
269276
// Just to make things fun, lldb sometimes translates \n into \r\n.
@@ -319,7 +326,6 @@ func newSession(appdir string, args []string, opts options) (*lldbSession, error
319326
iosdPath,
320327
"--debug",
321328
"-u",
322-
"-r",
323329
"-n",
324330
`--args=` + strings.Join(args, " ") + ``,
325331
"--bundle", appdir,

0 commit comments

Comments
 (0)