summaryrefslogtreecommitdiff
path: root/api
Commit message (Collapse)AuthorAgeFilesLines
* api/go1.13: add debug/elf.Symbol fields added in CL 184099Filippo Valsorda2019-08-081-0/+2
| | | | | | | | | | | | These will need auditing per #32813 like a few others in go1.13.txt, but in the meantime they break the API check for beta/RC releases. Updates #32813 Updates #31912 Change-Id: I3b0501b46324ee6fc0985f84971b99b772c7e4a4 Reviewed-on: https://go-review.googlesource.com/c/go/+/189458 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
* all: remove os.ErrTimeoutDamien Neil2019-08-021-3/+0
| | | | | | | | | | | | | | It is unclear whether the current definition of os.IsTimeout is desirable or not. Drop ErrTimeout for now so we can consider adding it (or some other error) in a future release with a corrected definition. Fixes #33411 Change-Id: I8b880da7d22afc343a08339eb5f0efd1075ecafe Reviewed-on: https://go-review.googlesource.com/c/go/+/188758 Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Damien Neil <dneil@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* all: remove os.ErrTemporaryDamien Neil2019-08-011-1/+0
| | | | | | | | | | | | | | | | | | | | As discussed in https://github.com/golang/go/issues/32463#issuecomment-506833421 the classification of deadline-based timeouts as "temporary" errors is a historical accident. I/O timeouts used to be duration-based, so they really were temporary--retrying a timed-out operation could succeed. Now that they're deadline-based, timeouts aren't temporary unless you reset the deadline. Drop ErrTemporary from Go 1.13, since its definition is wrong. We'll consider putting it back in Go 1.14 with a clear definition and deprecate net.OpError.Temporary. Fixes #32463 Change-Id: I70cda664590d8872541e17409a5780da76920891 Reviewed-on: https://go-review.googlesource.com/c/go/+/188398 Reviewed-by: Jonathan Amsterdam <jba@google.com>
* text/scanner: remove AllowDigitSeparator flag againRobert Griesemer2019-06-271-3/+0
| | | | | | | | | | | | | | | | The scanner was changed to accept the new Go number literal syntax of which separators are a part. Making them opt-in is inconsistent with the rest of the changes. For comparison, the strconv package also accepts the new number literals including separators with the various conversion routines, if no explicit number base is given. Updates #28493. Change-Id: Ifaae2225a9565364610813658bfe692901dd3ccd Reviewed-on: https://go-review.googlesource.com/c/go/+/184080 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
* api: promote next to go1.13go1.13beta1Andrew Bonventre2019-06-262-8042/+8037
| | | | | | | | Change-Id: I394f942822a0db27418d3fbb25df6227ea199a5f Reviewed-on: https://go-review.googlesource.com/c/go/+/183919 Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
* api: update next.txtBrad Fitzpatrick2019-05-081-2/+46
| | | | | | | Change-Id: I2f2a70dd9279ab95fdabee51579d49363a9f65b3 Reviewed-on: https://go-review.googlesource.com/c/go/+/176018 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* net/http: add support for SameSite=NoneVivek Sekhar2019-05-061-0/+2
| | | | | | | | | | | | | | Section 4.2 of the Internet-Draft for SameSite includes the possible SameSite value of "None". https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00 Change-Id: I44f246024429ec175db13ff6b36bee465f3d233d GitHub-Last-Rev: 170d24aaca4f00d750fca88740100f7c0b440d19 GitHub-Pull-Request: golang/go#31842 Reviewed-on: https://go-review.googlesource.com/c/go/+/175337 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
* api: add recent Go 1.13 workRuss Cox2019-04-261-0/+7985
| | | | | | | | | Change-Id: I0d1048723057dff0caf2059ce2efd63eb953ed82 Reviewed-on: https://go-review.googlesource.com/c/go/+/173947 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* all: update to Unicode 11Marcel van Lohuizen2019-04-252-1/+10
| | | | | | | | | | | | | | | | | This does *not* update the vendored tables. A commit updating these tables should follow soon, Mostly generated running UNICODE_VERSION=11.0.0 in x/text. Manually updated next.txt file. Updates golang/go#27945. Change-Id: I939a01e235aeca898ee9afc99a531e7ad8444e12 Reviewed-on: https://go-review.googlesource.com/c/go/+/154420 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
* text/scanner: don't liberally consume (invalid) floats or underbarsRobert Griesemer2019-02-202-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up on https://golang.org/cl/161199 which introduced the new Go 2 number literals to text/scanner. That change introduced a bug by allowing decimal and hexadecimal floats to be consumed even if the scanner was not configured to accept floats. This CL changes the code to not consume a radix dot '.' or exponent unless the scanner is configured to accept floats. This CL also introduces a new mode "AllowNumberbars" which controls whether underbars '_' are permitted as digit separators in numbers or not. There is a possibility that we may need to refine text/scanner further (e.g., the Float mode now includes hexadecimal floats which it didn't recognize before). We're very early in the cycle, so let's see how it goes. RELNOTE=yes Updates #12711. Updates #19308. Updates #28493. Updates #29008. Fixes #30320. Change-Id: I6481d314f0384e09ef6803ffad38dc529b1e89a3 Reviewed-on: https://go-review.googlesource.com/c/163079 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* api: add os.(*File).SyscallConn to go1.12.txtBrad Fitzpatrick2019-01-021-0/+1
| | | | | | | | | Fixes #29507 Change-Id: I8cf52e4b89fd28126f252757260d07a31d9dad61 Reviewed-on: https://go-review.googlesource.com/c/155933 Reviewed-by: Katie Hockman <katie@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
* syscall: revert to pre-FreeBSD 10 / POSIX-2008 timespec field names in ↵Yuval Pavel Zholkover2018-12-302-48/+0
| | | | | | | | | | | | | | | | Stat_t on FreeBSD CL 138595 introduced the new names when the hardcoded stat8 definitions was replaced with a cgo generated one. Fixes #29393 Updates #22448 Change-Id: I6309958306329ff301c17344b2e0ead0cc874224 Reviewed-on: https://go-review.googlesource.com/c/155958 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* api: promote next to go1.12Filippo Valsorda2018-12-181-0/+251
| | | | | | | | | | Change-Id: I9a30c76d1299a494cce69b1060156bc2932ac8d5 Reviewed-on: https://go-review.googlesource.com/c/154857 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* syscall: FreeBSD 12 ino64 supportYuval Pavel Zholkover2018-10-051-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is similar to CL 136816 for x/sys/unix, changing the FreeBSD ABI to use 64-bit inodes in Stat_t, Statfs_t, and Dirent types. The changes are forward compatible, that is FreeBSD 10.x, 11.x continue to use their current sysnum numbers. The affected types are converted to the new layout (with some overhead). Thus the same statically linked binary should work using the native sysnums (without any conversion) on FreeBSD 12. Breaking API changes in package syscall are: Mknod takes a uint64 (C dev_t) instead of int. Stat_t: Dev, Ino, Nlink, Rdev, Gen became uint64. Atimespec, Mtimespec, Ctimespec, Birthtimespec renamed to Atim, Mtim, Ctim, Birthtim respectively. Statfs_t: Mntonname and Mntfromname changed from [88]int8 to [1024]int8 arrays. Dirent: Fileno became uint64, Namlen uint16 and an additional field Off int64 (currently unused) was added. The following commands were run to generate ztypes_* and zsyscall_* on FreeBSD-12.0-ALPHA6 systems (GOARCH=386 were run on the same amd64 host): GOOS=freebsd GOARCH=amd64 ./mksyscall.pl -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go |gofmt >zsyscall_freebsd_amd64.go GOOS=freebsd GOARCH=amd64 go tool cgo -godefs types_freebsd.go | GOOS=freebsd GOARCH=amd64 go run mkpost.go >ztypes_freebsd_amd64.go GOOS=freebsd GOARCH=386 ./mksyscall.pl -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go |gofmt >zsyscall_freebsd_386.go GOOS=freebsd GOARCH=386 go tool cgo -godefs types_freebsd.go | GOOS=freebsd GOARCH=386 go run mkpost.go >ztypes_freebsd_386.go GOOS=freebsd GOARCH=arm ./mksyscall.pl -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go |gofmt >zsyscall_freebsd_arm.go GOOS=freebsd GOARCH=arm go tool cgo -godefs -- -fsigned-char types_freebsd.go | GOOS=freebsd GOARCH=arm go run mkpost.go >ztypes_freebsd_arm.go The Kevent struct was changed to use the FREEBSD_COMPAT11 version always (requiring the COMPAT_FREEBSD11 kernel option FreeBSD-12, this is the default). The definitions of ifData were not updated, their functionality in has have been replaced by vendored golang.org/x/net/route. freebsdVersion initialization was dropped from init() in favor of a sync.Once based wrapper - supportsABI(). Updates #22448. Change-Id: I359b756e2849c036d7ed7f75dbd6ec836e0b90b4 Reviewed-on: https://go-review.googlesource.com/c/138595 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/api: explicit tagKey with GOOS and GOARCHMeng Zhuo2018-10-051-0/+2
| | | | | | | | | | | | | | The origin tagKey is just dirname if no tags input which will cause pkgCache missmatch if other imported pkg explicit on GOARCH or GOOS This CL will add GOOS and GOARCH to tagKey Fixes #8425 Fixes #21181 Change-Id: Ifc189cf6746d753ad7c7e5bb60621297fc0a4e35 Reviewed-on: https://go-review.googlesource.com/c/138315 Reviewed-by: Robert Griesemer <gri@golang.org>
* os: add ModeCharDevice to ModeTypeTobias Klauser2018-09-131-0/+1
| | | | | | | | | | | | | | | | When masking FileInfo.Mode() from a character device with the ModeType mask, ModeCharDevice cannot be recovered. ModeCharDevice was added https://golang.org/cl/5531052, but nothing indicates why it was omitted from ModeType. Add it now. Fixes #27640 Change-Id: I52f56108b88b1b0a5bc6085c66c3c67e10600619 Reviewed-on: https://go-review.googlesource.com/135075 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* syscall: implement Unix Socket for WindowsYasuhiro Matsumoto2018-08-281-0/+2
| | | | | | | | | | | | | | Add implementation of AF_UNIX. This works only on Windows 10. https://blogs.msdn.microsoft.com/commandline/2017/12/19/af_unix-comes-to-windows/ Fixes #26072 Change-Id: I76a96a472385a17901885271622fbe55d66bb720 Reviewed-on: https://go-review.googlesource.com/125456 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
* crypto/tls: make ConnectionState.ExportKeyingMaterial a methodFilippo Valsorda2018-08-221-1/+1
| | | | | | | | | | | | | | The unexported field is hidden from reflect based marshalers, which would break otherwise. Also, make it return an error, as there are multiple reasons it might fail. Fixes #27125 Change-Id: I92adade2fe456103d2d5c0315629ca0256953764 Reviewed-on: https://go-review.googlesource.com/130535 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* api: add ErrorHandler function to httputil.ReverseProxyAndrew Bonventre2018-07-191-0/+1
| | | | | | | Change-Id: Ie706c43c9a11cf30ca0f2139a4e9eabac8c75c75 Reviewed-on: https://go-review.googlesource.com/125096 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* syscall: convert Windows AddrinfoW.Addr from uintptr to syscall.PointerBrad Fitzpatrick2018-07-122-2/+6
| | | | | | | | | | | | | | API compatibility violation, but it wasn't safe before and people should be using golang.org/x/sys/windows instead. Fixes #24820 Change-Id: I3b43493f56b3116924b9d848a294899279f314fd Reviewed-on: https://go-review.googlesource.com/123455 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* api: add some more API to go1.11.txtBrad Fitzpatrick2018-07-091-0/+10
| | | | | | | | Added since last update. Change-Id: Ic5be0e2e379d422ef72b956a794d65613a0dd7be Reviewed-on: https://go-review.googlesource.com/122815 Reviewed-by: Andrew Bonventre <andybons@golang.org>
* go/types: rename NewInterface2 to NewInterfaceTypeRobert Griesemer2018-06-261-1/+1
| | | | | | | | | | | NewInterface2 was introduced with https://go-review.googlesource.com/114317 which fixed #25301. Changed the name to NewInterfaceType to better match Go naming styles, per discussion with @josharian, @iant, et al. Change-Id: Ifa4708a5efd4f708295b33c3d20fdc5812e1b4fc Reviewed-on: https://go-review.googlesource.com/120875 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* os: have UserCacheDir return an error on failureAndrew Bonventre2018-06-251-1/+1
| | | | | | | | | | | | | Previously, it would return an empty string if it could not determine the user's cache directory. Return an error instead. Change-Id: I74f00b1ad3858efa3fe2700c599271ebfe5764b6 Reviewed-on: https://go-review.googlesource.com/120757 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* api: promote next to go1.11Andrew Bonventre2018-06-221-0/+546
| | | | | | | | | Change-Id: Ib8fa0a12363993033201ff707c315f4030811f89 Reviewed-on: https://go-review.googlesource.com/120595 Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* text/template/parse: undo breaking API changesDaniel Theophanes2018-06-221-9/+0
| | | | | | | | | | | | | | | | | golang.org/cl/84480 altered the API for the parse package for clarity and consistency. However, the changes also broke the API for consumers of the package. This CL reverts the API to the previous spelling, adding only a single new exported symbol. Fixes #25968 Change-Id: Ieb81054b61eeac7df3bc3864ef446df43c26b80f Reviewed-on: https://go-review.googlesource.com/120355 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
* syscall: update TOKEN_ALL_ACCESS according to WinNT.hThanabodee Charoenpiriyakij2018-06-111-0/+2
| | | | | | | | | | | TOKEN_ALL_ACCESS was changed at some stage by Microsoft. Updates #25775 Change-Id: I3e18914207a0020b2ebfb99f4e57aa55f9de813b Reviewed-on: https://go-review.googlesource.com/117635 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
* syscall: introduce Pointer type and use it instead of uintptrAlex Brainman2018-04-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some syscall structures used by crypto/x509 have uintptr fields that store pointers. These pointers are set with a pointer to another Go structure. But the pointers are not visible by garbage collector, and GC does not update the fields after they were set. So when structure with invalid uintptr pointers passed to Windows, we get memory corruption. This CL introduces CertInfo, CertTrustListInfo and CertRevocationCrlInfo types. It uses pointers to new types instead of uintptr in CertContext, CertSimpleChain and CertRevocationInfo. CertRevocationInfo, CertChainPolicyPara and CertChainPolicyStatus types have uintptr field that can be pointer to many different things (according to Windows API). So this CL introduces Pointer type to be used for those cases. As suggested by Austin Clements. Fixes #21376 Updates #24820 Change-Id: If95cd9eee3c69e4cfc35b7b25b1b40c2dc8f0df7 Reviewed-on: https://go-review.googlesource.com/106275 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* api: remove unnecessary lines from except.txtDaniel Martí2018-04-091-10/+0
| | | | | | | | | | | | | When I added the text/template/parse lines, I thought that both removed and added APIs should be listed here (i.e. both -pkg and +pkg lines). However that was wrong, as one can see by reading cmd/api/goapi.go, or seeing how removing the +pkg lines does not break the API test. Change-Id: I0a8dcd6db44762dadb58728acfb844bf118c9d45 Reviewed-on: https://go-review.googlesource.com/105376 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* text/template: add variable assignmentsDaniel Martí2018-04-042-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variables can be declared and shadowing is supported, but modifying existing variables via assignments was not available. This meant that modifying a variable from a nested block was not possible: {{ $v := "init" }} {{ if true }} {{ $v := "changed" }} {{ end }} v: {{ $v }} {{/* "init" */}} Introduce the "=" assignment token, such that one can now do: {{ $v := "init" }} {{ if true }} {{ $v = "changed" }} {{ end }} v: {{ $v }} {{/* "changed" */}} To avoid confusion, rename PipeNode.Decl to PipeNode.Vars, as the variables may not always be declared after this change. Also change a few other names to better reflect the added ambiguity of variables in pipelines. Modifying the text/template/parse package in a backwards incompatible manner is acceptable, given that the package godoc clearly states that it isn't intended for general use. It's the equivalent of an internal package, back when internal packages didn't exist yet. To make the changes to the parse package sit well with the cmd/api test, update except.txt with the changes that we aren't worried about. Fixes #10608. Change-Id: I1f83a4297ee093fd45f9993cebb78fc9a9e81295 Reviewed-on: https://go-review.googlesource.com/84480 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
* api: add exception for os.ModeType valueJoe Tsai2018-03-301-0/+1
| | | | | | | | | | | | | | The ModeType constant is a bit-wise OR of several other values. It is reasonable for this to change without breaking compatibility. This fixes the failures introduced by https://golang.org/cl/103597 Change-Id: I817e351cf3d1e0115dce665c8efbce21bc36426c Reviewed-on: https://go-review.googlesource.com/103616 Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* syscall: support Getwd on all BSDsTobias Klauser2018-02-131-0/+16
| | | | | | | | | | | | | | | | | | | | | All supported BSDs provide the SYS___GETCWD syscall which can be used to implement syscall.Getwd. With this change os.Getwd can use a single syscall instead of falling back to the current kludge solution on the BSDs. This doesn't add any new exported functions to the frozen syscall package, only ImplementsGetwd changes to true for dragonfly, freebsd, netbsd and openbsd. As suggested by Ian, this follows CL 83755 which did the same for golang.org/x/sys/unix. Also, an entry for netbsd/arm is added to mkall.sh which was used to generate the syscall wrappers there. Change-Id: I84da1ec61a6b8625443699a63cde556b6442ad41 Reviewed-on: https://go-review.googlesource.com/84484 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* text/template: revert CL 66410 "add break, continue actions in ranges"Ian Lance Taylor2018-02-061-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The new break and continue actions do not work in html/template, and fixing them requires thinking about security issues that seem too tricky at this stage of the release. We will try again for 1.11. Original CL description: text/template: add break, continue actions in ranges Adds the two range control actions "break" and "continue". They act the same as the Go keywords break and continue, but are simplified in that only the innermost range statement can be broken out of or continued. Fixes #20531 Updates #20531 Updates #23683 Change-Id: Ia7fd3c409163e3bcb5dc42947ae90b15bdf89853 Reviewed-on: https://go-review.googlesource.com/92155 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
* doc, api: add type Srcset string change to go1.10 notes and APIgo1.10beta2Andrew Bonventre2018-01-111-0/+1
| | | | | | Change-Id: I13afaa894292bd566510b40a5e4bbbe4d72d4d08 Reviewed-on: https://go-review.googlesource.com/87395 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* strings: fix two Builder bugs allowing mutation of strings, remove ReadFromBrad Fitzpatrick2017-12-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Builder's ReadFrom method allows the underlying unsafe slice to escape, and for callers to subsequently modify memory that had been unsafely converted into an immutable string. In the original proposal for Builder (#18990), I'd noted there should be no Read methods: > There would be no Reset or Bytes or Truncate or Read methods. > Nothing that could mutate the []byte once it was unsafely converted > to a string. And in my prototype (https://golang.org/cl/37767), I handled ReadFrom properly, but when https://golang.org/cl/74931 arrived, I missed that it had a ReadFrom method and approved it. Because we're so close to the Go 1.10 release, just remove the ReadFrom method rather than think about possible fixes. It has marginal utility in a Builder anyway. Also, fix a separate bug that also allowed mutation of a slice's backing array after it had been converted into a slice by disallowing copies of the Builder by value. Updates #18990 Fixes #23083 Fixes #23084 Change-Id: Id1f860f8a4f5f88b32213cf85108ebc609acb95f Reviewed-on: https://go-review.googlesource.com/83255 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* api: promote next to go1.10Andrew Bonventre2017-12-072-641/+645
| | | | | | | | | | Change-Id: I2a4347540ecb94a9f124a228dc31452620ab0645 Reviewed-on: https://go-review.googlesource.com/82335 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Chris Broadfoot <cbro@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* api: update next.txtRuss Cox2017-11-151-3/+44
| | | | | | | Change-Id: I540bdabe8ffda4697315fa6f09ad710c05b4a94d Reviewed-on: https://go-review.googlesource.com/78134 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* api: update next.txtRuss Cox2017-10-281-1/+594
| | | | | | Change-Id: Ib342468f3727be0cd6268ab824ad06d783ee7c94 Reviewed-on: https://go-review.googlesource.com/73993 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* unicode: update to Unicode 10.0.0Marcel van Lohuizen2017-10-242-0/+7
| | | | | | | | | | | | | | | | | | | | Also includes all derived values as well as vendored packages. Generated by running UNICODE_VERSION=10.0.0 go generate in golang.org/x/text and modified by hand to add the tests and entries in next.txt for new script and properties. Closes Issue #21471 Change-Id: I1d10ee3887bd1fd3d5a756ee0d04bd6ec2814ba1 Reviewed-on: https://go-review.googlesource.com/63953 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org>
* math/big: provide support for conversion bases up to 62griesemer2017-10-062-0/+2
| | | | | | | | | | | | | | | | | | | | | Increase MaxBase from 36 to 62 and extend the conversion alphabet with the upper-case letters 'A' to 'Z'. For int conversions with bases <= 36, the letters 'A' to 'Z' have the same values (10 to 35) as the corresponding lower-case letters. For conversion bases > 36 up to 62, the upper-case letters have the values 36 to 61. Added MaxBase to api/except.txt: Clients should not make assumptions about the value of MaxBase being constant. The core of the change is in natconv.go. The remaining changes are adjusted tests and documentation. Fixes #21558. Change-Id: I5f74da633caafca03993e13f32ac9546c572cc84 Reviewed-on: https://go-review.googlesource.com/65970 Reviewed-by: Martin Möhrmann <moehrmann@google.com>
* doc, api: add syscall.SysProcAttr.AmbientCaps change to 1.9 notes, APIBrad Fitzpatrick2017-06-291-0/+6
| | | | | | | | | | Updates #20587 Change-Id: I08377281270631ee08cd05ba835aa698ca23fa56 Reviewed-on: https://go-review.googlesource.com/47092 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* api: promote next to go1.9Chris Broadfoot2017-06-142-163/+163
| | | | | | | | Change-Id: I27aa87607aa82b400411a60c6bdb6f9a42ff97c1 Reviewed-on: https://go-review.googlesource.com/45776 Run-TryBot: Chris Broadfoot <cbro@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* api: update next.txtChris Broadfoot2017-06-141-16/+43
| | | | | | Change-Id: I824fc5a62977140ccc62d55e8b42cfd01da935e9 Reviewed-on: https://go-review.googlesource.com/45774 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* api: update next.txtBrad Fitzpatrick2017-05-021-0/+136
| | | | | | | | Change-Id: Ifbfd71a9c0d447e22c369c9d1209063b2a5c657b Reviewed-on: https://go-review.googlesource.com/42490 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* math/big: define Word as uint instead of uintptrRobert Griesemer2017-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | For compatibility with math/bits uint operations. When math/big was written originally, the Go compiler used 32bit int/uint values even on a 64bit machine. uintptr was the type that represented the machine register size. Now, the int/uint types are sized to the native machine register size, so they are the natural machine Word type. On most machines, the size of int/uint correspond to the size of uintptr. On platforms where uint and uintptr have different sizes, this change may lead to performance differences (e.g., amd64p32). Change-Id: Ief249c160b707b6441848f20041e32e9e9d8d8ca Reviewed-on: https://go-review.googlesource.com/37372 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* Revert "cmd/go: note when some Go files were ignored on no-Go-files errors"Brad Fitzpatrick2016-12-211-1/+0
| | | | | | | | | | | | | | | | | This reverts commit eee727d0855b9e78f9df87e08d57b1d7f264876c (https://golang.org/cl/29113) The " (.go files ignored due to build tags)" error message is not always accurate. Fixes #18396 Updates #17008 Change-Id: I609653120603a7f6094bc1dc3a83856f4b259241 Reviewed-on: https://go-review.googlesource.com/34662 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
* api: add openbsd syscall constantsgo1.8beta2Chris Broadfoot2016-12-151-0/+4
| | | | | | Change-Id: I3ec00dac5e7d0e6dcafb7d65851bc53e0661c2b6 Reviewed-on: https://go-review.googlesource.com/34500 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* database/sql: do not store Tx options in ContextDaniel Theophanes2016-12-141-7/+9
| | | | | | | | | | | | | Drivers which previously supported tip will need to update to this revision before release. Fixes #18284 Change-Id: I70b8e7afff1558a8b5348885ce9f50e067c72ee9 Reviewed-on: https://go-review.googlesource.com/34330 Run-TryBot: Daniel Theophanes <kardianos@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* runtime, syscall: update openbsd for changes to syskillJoel Sing2016-12-121-0/+4
| | | | | | | | | | | | | | | | | | | | | Change the openbsd runtime to use the current sys_kill and sys_thrkill system calls. Prior to OpenBSD 5.9 the sys_kill system call could be used with both processes and threads. In OpenBSD 5.9 this functionality was split into a sys_kill system call for processes (with a new syscall number) and a sys_thrkill system call for threads. The original/legacy system call was retained in OpenBSD 5.9 and OpenBSD 6.0, however has been removed and will not exist in the upcoming OpenBSD 6.1 release. Note: This change is needed to make Go work on OpenBSD 6.1 (to be released in May 2017) and should be included in the Go 1.8 release. This change also drops support for OpenBSD 5.8, which is already an unsupported OpenBSD release. Change-Id: I525ed9b57c66c0c6f438dfa32feb29c7eefc72b0 Reviewed-on: https://go-review.googlesource.com/34093 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* api: remove testing Context accessors from go1.8.txtBrad Fitzpatrick2016-12-091-3/+0
| | | | | | | | | | | Fixes the build. Updates #18199 Change-Id: Ibf029ba9f9293d1f3d49c1c8773fc262159a5d5b Reviewed-on: https://go-review.googlesource.com/34242 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
* runtime: add number of forced GCs to MemStatsAustin Clements2016-12-071-0/+1
| | | | | | | | | | | | | This adds a counter for the number of times the application forced a GC by, e.g., calling runtime.GC(). This is useful for detecting applications that are overusing/abusing runtime.GC() or debug.FreeOSMemory(). Fixes #18217. Change-Id: I990ab7a313c1b3b7a50a3d44535c460d7c54f47d Reviewed-on: https://go-review.googlesource.com/34067 Reviewed-by: Russ Cox <rsc@golang.org>