summaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/help
Commit message (Collapse)AuthorAgeFilesLines
* cmd/go, go/build: clarify build constraint docsIan Lance Taylor2022-07-011-6/+7
| | | | | | | | | | | | | | | | | Clarify that the //go:build line is an expression of constraints, not a constraint itself. Fixes #53308 Change-Id: Ib67243c6ee5cfe3b688c12b943b5e7496f686035 Reviewed-on: https://go-review.googlesource.com/c/go/+/411697 Reviewed-by: Rob Pike <r@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: David Chase <drchase@google.com>
* all: replace `` and '' with “ (U+201C) and ” (U+201D) in doc commentsRuss Cox2022-04-051-1/+1
| | | | | | | | | | | | | | | | go/doc in all its forms applies this replacement when rendering the comments. We are considering formatting doc comments, including doing this replacement as part of the formatting. Apply it to our source files ahead of time. For #51082. Change-Id: Ifcc1f5861abb57c5d14e7d8c2102dfb31b7a3a19 Reviewed-on: https://go-review.googlesource.com/c/go/+/384262 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* go/build: recognize "unix" build tagIan Lance Taylor2022-03-281-0/+1
| | | | | | | | | | | | | | | The new "unix" build tag matches any Unix or Unix-like system. This is only recognized on go:build lines, not in file names. For #20322 Fixes #51572 Change-Id: I3a991f9e69353b25e259bc6462709cdcd83640fb Reviewed-on: https://go-review.googlesource.com/c/go/+/389934 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Rob Pike <r@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
* cmd/go: set go.work path using GOWORK, and remove -workfile flagMichael Matloob2022-02-161-0/+8
| | | | | | | | | | | | | | | | | | | | This change removes the -workfile flag and allows the go.work file path to be set using GOWORK (which was previously read-only). This removes the potential discrepancy and confusion between the flag and environment variable. GOWORK will still return the actual path of the go.work file found if it is set to '' or 'auto'. GOWORK will return 'off' if it is set to 'off'. For #45713 Fixes #51171 Change-Id: I72eed65d47c63c81433f2b54158d514daeaa1ab3 Reviewed-on: https://go-review.googlesource.com/c/go/+/385995 Trust: Michael Matloob <matloob@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
* cmd/go: document that GOENV=off disables the default config fileIan Lance Taylor2022-02-011-0/+2
| | | | | | | | | | | | | Fixes #46840 Change-Id: Icc5475e312003e316dc039413a35089485163ba6 Reviewed-on: https://go-review.googlesource.com/c/go/+/381894 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Trust: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
* doc: improve documentation for GOAMD64Ulrich Kunitz2022-01-061-1/+1
| | | | | | | | | | | | | | | | | | The change clarifies in the release notes for go1.18 that the variable is for compilation and references the microarchitecture description in the Go Wiki, https://golang.org/wiki/MinimumRequirements#amd64, and references the same information in the output of go help environment. Fixes #50174 Change-Id: I6a7d5a06f48463a810c96cc9c76fe66113d5147c Reviewed-on: https://go-review.googlesource.com/c/go/+/372194 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
* all: gofmt -w -r 'interface{} -> any' srcRuss Cox2021-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | And then revert the bootstrap cmd directories and certain testdata. And adjust tests as needed. Not reverting the changes in std that are bootstrapped, because some of those changes would appear in API docs, and we want to use any consistently. Instead, rewrite 'any' to 'interface{}' in cmd/dist for those directories when preparing the bootstrap copy. A few files changed as a result of running gofmt -w not because of interface{} -> any but because they hadn't been updated for the new //go:build lines. Fixes #49884. Change-Id: Ie8045cba995f65bd79c694ec77a1b3d1fe01bb09 Reviewed-on: https://go-review.googlesource.com/c/go/+/368254 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
* Revert "cmd/go: remove support for -buildmode=shared"Bryan C. Mills2021-10-291-0/+5
| | | | | | | | | | | | | | | This reverts CL 359096. Updates #47788. Reason for revert: -buildmode=shared may have actually been working in a few very specific cases. We should not remove -buildmode=shared until we have implemented an alternative to support those few cases. Change-Id: Ia962b06abacc11f6f29fc29d092773be175e32f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/359575 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
* cmd/go: remove support for -buildmode=sharedBryan C. Mills2021-10-271-5/+0
| | | | | | | | | | | | | | | It never worked in module mode (or with a read-only GOROOT). A proposal to drop it was filed (and approved) in https://golang.org/issue/47788. Fixes #47788 Change-Id: I0c12f38eb0c5dfe9384fbdb49ed202301fa4273d Reviewed-on: https://go-review.googlesource.com/c/go/+/359096 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
* testing: address feedback for dev.fuzz mergeJay Conrod2021-09-241-0/+7
| | | | | | | | | | | | | | | Based on comments in CL 348469. Note that with this change, F.Fuzz no longer calls runtime.Goexit. This simplifies our logic and makes F.Fuzz more predictable. Change-Id: I6c3c65b0e8e8f261621cbe2f17375e8164ef60a0 Reviewed-on: https://go-review.googlesource.com/c/go/+/351316 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
* cmd/go: fix GOARCH value in GOAMD64 docsTobias Klauser2021-09-171-1/+1
| | | | | | | | | | | | | GOAMD64 is for GOARCH=amd64. Fix the GOAMD64 environment variable docs introduced by CL 349595. Change-Id: I794990ebe2e306d21ed275446fc52373bfe4ae7d Reviewed-on: https://go-review.googlesource.com/c/go/+/350534 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org>
* cmd/go: add GOAMD64 environment variablenimelehin2021-09-161-0/+4
| | | | | | | | | | | | | | | | The variable represents the microarchitecture level for which to compile. Valid values are v1 (default), v2, v3, v4. Updates #45453 Change-Id: I095197fc9239d79f98896d7e745e2341354daca4 GitHub-Last-Rev: f83ed17204606264073be5b9831f9d24f2f9dbc4 GitHub-Pull-Request: golang/go#48359 Reviewed-on: https://go-review.googlesource.com/c/go/+/349595 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Bryan C. Mills <bcmills@google.com>
* cmd/go: add GOEXPERIMENT to `go env` outputMatthew Dempsky2021-06-281-0/+6
| | | | | | | | | | | | | | | | This CL adds GOEXPERIMENT to `go env` output, and also makes it configurable via `GOENV`. Thanks to Baokun Lee's CL 304350 for the test and initial work on this. Fixes #45226. Change-Id: Ie7f92a8a503b6a2a4df3f6598f0b2bf2915e2e7d Reviewed-on: https://go-review.googlesource.com/c/go/+/328751 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> Trust: Bryan C. Mills <bcmills@google.com> Trust: Matthew Dempsky <mdempsky@google.com>
* cmd/go: document GOPPC64 environment variableIan Lance Taylor2021-06-211-0/+3
| | | | | | | | | Change-Id: I2d2c02eec4ac6eca218fa5334d32650c1620692c Reviewed-on: https://go-review.googlesource.com/c/go/+/329689 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Carlos Eduardo Seo <carlos.seo@linaro.org>
* cmd/go, go/build: update docs to use //go:build syntaxDamien Neil2021-06-151-24/+18
| | | | | | | | | | | Fixes #46124. Change-Id: I6b8179032102a14befc37719f64ddace98397c97 Reviewed-on: https://go-review.googlesource.com/c/go/+/326931 Trust: Damien Neil <dneil@google.com> Run-TryBot: Damien Neil <dneil@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
* cmd/go: remove -insecure flag on go getwitchard2021-03-021-4/+3
| | | | | | | | | | | | | | Resolves #37519 Change-Id: Iba675a180b0e61b12835cdb6ecd4c6dc61e0605c GitHub-Last-Rev: aa018af6f8fc7f0b829820e831ad96734adcb8d0 GitHub-Pull-Request: golang/go#44724 Reviewed-on: https://go-review.googlesource.com/c/go/+/297709 Trust: Jay Conrod <jayconrod@google.com> Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
* cmd/go: multiple small 'go help' fixesJay Conrod2021-02-111-1/+1
| | | | | | | | | | | | | | | | | | * Link to privacy policies for proxy.golang.org and sum.golang.org in 'go help modules'. It's important that both policies are linked from the go command's documentation. * Fix wording and typo in 'go help vcs' following comments in CL 290992, which adds reference documentation for GOVCS. * Fix whitespace on GOVCS in 'go help environment'. For #41730 Change-Id: I86abceacd4962b748361244026f219157c9285e9 Reviewed-on: https://go-review.googlesource.com/c/go/+/291230 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org>
* cmd/go: revise 'go help' documentation for modulesJay Conrod2021-01-081-5/+14
| | | | | | | | | | | | | | | | | | Module-related help pages now contain a brief summary and point to the reference documentation at golang.org/ref/mod for details. Help pages for commands like 'go get' still describe the basic usage and summarize flags but don't provide as much background detail. Fixes #41427 Fixes #43419 Change-Id: Icacd38e0f33c352c447cc5a496c99674493abde2 Reviewed-on: https://go-review.googlesource.com/c/go/+/282615 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
* cmd/go: introduce the GOVERSION env variableDaniel Martí2020-11-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This is an extra variable available via 'go env', but not read from the user's environment. It corresponds to the same string that runtime.Version returns, assuming a program is built by the same version of Go. It's similar to the output of 'go version', but without the "go version" prefix nor the "$GOOS/$GOARCH" suffix. The main use case here is tools, which often use 'go env' to query basic information about the installed Go tree. Its version was one missing piece of information, which required an extra call to 'go version' before this change. Fixes #41116. Change-Id: I5c9d8c2ba856c816c9f4c462ba73c907b3441445 Reviewed-on: https://go-review.googlesource.com/c/go/+/265637 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> Reviewed-by: Russ Cox <rsc@golang.org> Trust: Jay Conrod <jayconrod@google.com> Trust: Daniel Martí <mvdan@mvdan.cc>
* cmd/go: add GOVCS setting to control version control usageRuss Cox2020-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The go command runs commands like git and hg to download modules. In the past, we have had problems with security bugs in version control systems becoming security bugs in “go get”. The original modules draft design removed use of these commands entirely, saying: > We want to move away from invoking version control tools such as bzr, > fossil, git, hg, and svn to download source code. These fragment the > ecosystem: packages developed using Bazaar or Fossil, for example, are > effectively unavailable to users who cannot or choose not to install > these tools. The version control tools have also been a source of > exciting security problems. It would be good to move them outside the > security perimeter. The removal of these commands was not possible in the end: being able to fetch directly from Git repos is too important, especially for closed source. But the security exposure has not gone away. We remain vulnerable to problems in VCS systems, especially the less scrutinized ones. This change adds a GOVCS setting to let users control which version control systems are allowed by default. It also changes the default allowed version control systems to git and hg for public code and any version control system for private code (import path or module path matched by the GOPRIVATE setting). See the changes in alldocs.go for detailed documentation. See #41730 for proposal and discussion. Fixes #41730. [Replay of CL 266420. See changes from Patch Set 1 for updates to fix a few long tests.] Change-Id: I4fe93804548956c42aea985368b4571bdb220f48 Reviewed-on: https://go-review.googlesource.com/c/go/+/267888 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
* cmd/go: revert "add GOVCS setting to control version control usage"Dmitri Shuralyov2020-11-051-1/+1
| | | | | | | | | | | This reverts CL 266420. Reason for revert: tests aren't passing on linux-{386,amd64}-longtest. Change-Id: Icec47cded795a51ef7569dfb2d93d9211b4fb578 Reviewed-on: https://go-review.googlesource.com/c/go/+/267799 Trust: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
* cmd/go: add GOVCS setting to control version control usageRuss Cox2020-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The go command runs commands like git and hg to download modules. In the past, we have had problems with security bugs in version control systems becoming security bugs in “go get”. The original modules draft design removed use of these commands entirely, saying: > We want to move away from invoking version control tools such as bzr, > fossil, git, hg, and svn to download source code. These fragment the > ecosystem: packages developed using Bazaar or Fossil, for example, are > effectively unavailable to users who cannot or choose not to install > these tools. The version control tools have also been a source of > exciting security problems. It would be good to move them outside the > security perimeter. The removal of these commands was not possible in the end: being able to fetch directly from Git repos is too important, especially for closed source. But the security exposure has not gone away. We remain vulnerable to problems in VCS systems, especially the less scrutinized ones. This change adds a GOVCS setting to let users control which version control systems are allowed by default. It also changes the default allowed version control systems to git and hg for public code and any version control system for private code (import path or module path matched by the GOPRIVATE setting). See the changes in alldocs.go for detailed documentation. See #41730 for proposal and discussion. Fixes #41730. Change-Id: I1999ddf7445b36a7572965be5897c7a1ff7f4265 Reviewed-on: https://go-review.googlesource.com/c/go/+/266420 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
* all: implement GO386=softfloatKeith Randall2020-10-061-0/+3
| | | | | | | | | | | | | Backstop support for non-sse2 chips now that 387 is gone. RELNOTE=yes Change-Id: Ib10e69c4a3654c15a03568f93393437e1939e013 Reviewed-on: https://go-review.googlesource.com/c/go/+/260017 Trust: Keith Randall <khr@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* all: drop 387 supportKeith Randall2020-10-021-3/+0
| | | | | | | | | | | | | My last 387 CL. So sad ... ... ... ... not! Fixes #40255 Change-Id: I8d4ddb744b234b8adc735db2f7c3c7b6d8bbdfa4 Reviewed-on: https://go-review.googlesource.com/c/go/+/258957 Trust: Keith Randall <khr@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
* all: add GOOS=iosCherry Zhang2020-09-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Introduce GOOS=ios for iOS systems. GOOS=ios matches "darwin" build tag, like GOOS=android matches "linux" and GOOS=illumos matches "solaris". Only ios/arm64 is supported (ios/amd64 is not). GOOS=ios and GOOS=darwin remain essentially the same at this point. They will diverge at later time, to differentiate macOS and iOS. Uses of GOOS=="darwin" are changed to (GOOS=="darwin" || GOOS=="ios"), except if it clearly means macOS (e.g. GOOS=="darwin" && GOARCH=="amd64"), it remains GOOS=="darwin". Updates #38485. Change-Id: I4faacdc1008f42434599efb3c3ad90763a83b67c Reviewed-on: https://go-review.googlesource.com/c/go/+/254740 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
* cmd/go: include GOMODCACHE in 'go help environment'Jay Conrod2020-07-131-0/+2
| | | | | | | | | | | Updates #34527 Fixes #40089 Change-Id: Ie9c8573536e5c31e874d755f4d888ffc805b796f Reviewed-on: https://go-review.googlesource.com/c/go/+/241275 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org>
* go/build: move build constraint docs to 'go help buildconstraint'Jay Conrod2020-05-291-34/+69
| | | | | | | | | | | | | | | | | | | | | CL 228017 added a new help page 'go help buildconstraint' which summarized the information on build constraints in the go/build documentation. The summary was almost as long as the go/build documentation, since there's very little that can be left out. This CL moves the original go/build documentation to 'go help buildconstraint' to eliminate redundnancy. The text describing enabled tags is slightly different (targeting command-line users more than go/build users), but the rest of the documentation is unchanged. Fixes #37018 Change-Id: Ic0ed4c6fdae2395dd58852e1600c701247c9c4cc Reviewed-on: https://go-review.googlesource.com/c/go/+/232981 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
* cmd/go: remove GOAMD64 environment variableDavid Chase2020-05-201-3/+0
| | | | | | | | | | | | | | | This removes the GOAMD64 environment variable and its documentation. The value is instead supplied by a compiled-in constant. Note that function alignment is also dependent on the value of the (removed) flag; it is 32 for aligned jumps, 16 if not. When the flag-dependent logic is removed, it will be 32. Updates #35881. Change-Id: Ic41c0b9833d2e8a31fa3ce8067d92aa2f165bf72 Reviewed-on: https://go-review.googlesource.com/c/go/+/231600 Reviewed-by: Austin Clements <austin@google.com>
* cmd/internal/obj/x86: prevent jumps crossing 32 byte boundariesMark Ryan2020-05-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a new option to the x86 assembler. If the GOAMD64 environment variable is set to alignedjumps (the default) and we're doing a 64 bit build, the assembler will make sure that neither stand alone nor macro-fused jumps will end on or cross 32 byte boundaries. To achieve this, functions are aligned on 32 byte boundaries, rather than 16 bytes, and jump instructions are padded to ensure that they do not cross or end on 32 byte boundaries. Jumps are padded by adding a NOP instruction of the appropriate length before the jump. The commit is likely to result in larger binary sizes when GOAMD64=alignedjumps. On the binaries tested so far, an increase of between 1.4% and 1.5% has been observed. Updates #35881 Co-authored-by: David Chase <drchase@google.com> Change-Id: Ief0722300bc3f987098e4fd92b22b14ad6281d91 Reviewed-on: https://go-review.googlesource.com/c/go/+/219357 Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/go: add 'go help buildconstraint'Michał Łowicki2020-05-012-1/+58
| | | | | | | | | | Fixes #37018 Change-Id: I1d32c1cb432bc2d7a4d8d6b5c3a54fee558141ec Reviewed-on: https://go-review.googlesource.com/c/go/+/228017 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
* cmd/go/internal/modget: improve GOINSECURE docswitchard2020-04-231-0/+3
| | | | | | | | | | | | | | | | Recommend use of GOINSECURE over -insecure flang and clarify that GOINSECURE environment variable does not also imply GONOSUMDB. Updates #37519 by adding documentation as discussed. Change-Id: Ia8ab6b3ed1aa559343b72e4ca76c372ee6bf1941 GitHub-Last-Rev: 8d86991f0c1a759f45568c1cc6ef6dc41225f2ba GitHub-Pull-Request: golang/go#38572 Reviewed-on: https://go-review.googlesource.com/c/go/+/229223 Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/go: document 'go env GOMOD' outside modulesJay Conrod2019-12-091-2/+4
| | | | | | | | | | | | In documentation for 'go env GOMOD', note that the path will be os.DevNull in module-aware mode when no go.mod file is present. Fixes #36052 Change-Id: I30ced1df02ccefe1970bd856190e79d6f0384375 Reviewed-on: https://go-review.googlesource.com/c/go/+/210577 Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com>
* cmd/go/internal/modfetch: add GOINSECUREwitchard2019-11-081-0/+4
| | | | | | | | | | | | | | | Enables insecure fetching of dependencies whos path matches those specified in the enironment variable GOINSECURE. Fixes #32966 Change-Id: I378920fbd5a4436df0b5af3fb5533e663e2cc758 GitHub-Last-Rev: 2c87b303acbe86e273bd0b8514e338d34794b0d6 GitHub-Pull-Request: golang/go#35357 Reviewed-on: https://go-review.googlesource.com/c/go/+/205238 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com>
* go/build: recognize '.sx' as equivalent of '.S'Umang Parmar2019-10-201-3/+3
| | | | | | | | | | | | | | | On case insensitive filesystems, '.S' is interpreted as '.s' so, providing option to use '.sx' extension for '.S' files as an alternative. Fixes #32434 Change-Id: Ie2f7e5e2f3f12690ce18659e30ca94252a8f7bfc GitHub-Last-Rev: dcca989ec41ddc1d06ea509b78dce7d70bc996ed GitHub-Pull-Request: golang/go#32557 Reviewed-on: https://go-review.googlesource.com/c/go/+/181699 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* cmd/go: keep "go help" in unknown topic suggestionJordi Martin2019-07-231-1/+1
| | | | | | | | | | | | | | Fixed missing concatenation to build the suggested command. Fixes #33153 Change-Id: I26c02f2966247aa07d1447b8ec1a2203046842dd GitHub-Last-Rev: 9631abf1d0d187cbd94495a2a789e5863b421441 GitHub-Pull-Request: golang/go#33245 Reviewed-on: https://go-review.googlesource.com/c/go/+/187217 Reviewed-by: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/go: mention GODEBUG in "go help environment"Ian Lance Taylor2019-07-231-0/+3
| | | | | | | | Change-Id: Id2c07ccba7c514ec3a4bbd493edbc68ae5cd6250 Reviewed-on: https://go-review.googlesource.com/c/go/+/187157 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
* cmd/go: add GOPRIVATE environment variableRuss Cox2019-06-121-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | It is too confusing to have to set GONOSUMDB and GONOPROXY in common use cases, but one cannot be guaranteed to be a subset of the other. This CL adds GOPRIVATE, which takes the same kind of pattern list but is defined as "these patterns are private (non-public) modules". Today the implication is that GOPRIVATE is the default setting for GONOSUMDB and GONOPROXY. If there are other accommodations to make for private packages in the future or in other tools, having this clear statement of intent will let us do that. (For example maybe an IDE integration would hyperlink an import path to godoc.org; consulting GOPRIVATE would be a reasonable way to decide not to do that for certain imports. In contrast, consulting GONOPROXY or GONOSUMDB clearly would not.) Fixes #32184. Change-Id: If54c12d353c7a0a5c0e0273764140cce3c154a02 Reviewed-on: https://go-review.googlesource.com/c/go/+/181719 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/go: document GO{NO}SUMDB in 'go help environment' and 'go help modules'Tyler Bui-Palsulich2019-06-041-1/+12
| | | | | | | | | | | | | | GOSUMDB and GONOSUMDB are described in detail by 'go help module-auth'. So, this change mentions the two variables and says to see 'go help module-auth'. This also adds GONOPROXY to 'go help environment'. Fixes #32292 and updates #32056. Change-Id: I2eae0f906a3fbfcb88ad5c8fb4870917d0d7bbcd Reviewed-on: https://go-review.googlesource.com/c/go/+/179219 Reviewed-by: Russ Cox <rsc@golang.org>
* cmd/go: add env -w and env -u to set and unset default env varsRuss Cox2019-04-231-19/+28
| | | | | | | | | | | | | | | | | Setting environment variables for go command configuration is too difficult and system-specific. This CL adds go env -w, to change the default settings more easily, in a portable way. It also adds go env -u, to unset those changes. See https://golang.org/design/30411-env for details. Fixes #30411. Change-Id: I36e83f55b666459f8f7f482432a4a6ee015da71d Reviewed-on: https://go-review.googlesource.com/c/go/+/171137 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
* cmd/compile: add saturating conversions on wasmRichard Musiol2019-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This change adds the GOWASM option "satconv" to enable the generation of experimental saturating (non-trapping) float-to-int conversions. It improves the performance of the conversion by 42%. Previously the conversions had already been augmented with helper functions to have saturating behavior. Now Wasm.rules is always using the new operation names and wasm/ssa.go is falling back to the helpers if the feature is not enabled. The feature is in phase 4 of the WebAssembly proposal process: https://github.com/WebAssembly/meetings/blob/master/process/phases.md More information on the feature can be found at: https://github.com/WebAssembly/nontrapping-float-to-int-conversions/blob/master/proposals/nontrapping-float-to-int-conversion/Overview.md Change-Id: Ic6c3688017054ede804b02b6b0ffd4a02ef33ad7 Reviewed-on: https://go-review.googlesource.com/c/go/+/170119 Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/go: add a note in help buildmode for c-archive on AIXClément Chigot2019-04-031-0/+3
| | | | | | | | | | | As ld on AIX doesn't keep the same layout in .text section, -Wl,-bnoobjreoder must be passed to gcc when building a C program with a Go archive. Change-Id: I89b584cce43ab5792f315192b073923c10d5690e Reviewed-on: https://go-review.googlesource.com/c/go/+/170538 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* cmd/compile: add sign-extension operators on wasmRichard Musiol2019-03-281-0/+3
| | | | | | | | | | | | | | | | | | This change adds the GOWASM option "signext" to enable the generation of experimental sign-extension operators. The feature is in phase 4 of the WebAssembly proposal process: https://github.com/WebAssembly/meetings/blob/master/process/phases.md More information on the feature can be found at: https://github.com/WebAssembly/sign-extension-ops/blob/master/proposals/sign-extension-ops/Overview.md Change-Id: I6b30069390a8699fbecd9fb4d1d61e13c59b0333 Reviewed-on: https://go-review.googlesource.com/c/go/+/168882 Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/go: fix minor grammatical nit: command-line is an adjective...Rob Pike2019-03-201-1/+1
| | | | | | | | | | | while command line is a noun. Change-Id: I9dfc2f6841d1171854857a8daa785d55afe2c5f3 Reviewed-on: https://go-review.googlesource.com/c/go/+/167783 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/go: change the default value of GO111MODULE to 'on'Bryan C. Mills2019-03-141-2/+5
| | | | | | | | | | | | | | | This reverts CL 166985, restoring CL 162698. The bootstrap failure from CL 162698 was fixed in CL 167077 and CL 167078. Fixes #30228 Change-Id: I5a4e3081018c51b74b67185e64f20a9c824a564e Reviewed-on: https://go-review.googlesource.com/c/go/+/167087 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
* cmd/go: document GOGCCFLAGSShubham Sharma2019-03-121-0/+2
| | | | | | | | | | Fixes #30123 Change-Id: I310b89a344a262bb758d39dfdd485ed2940cc6aa Reviewed-on: https://go-review.googlesource.com/c/go/+/166577 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* Revert "cmd/go: change the default value of GO111MODULE to 'on'"Bryan C. Mills2019-03-121-5/+2
| | | | | | | | | | | This reverts commit cf4691650c3c556f19844a881a32792a919ee8d1 (CL 162698). Reason for revert: broke make.bash bootstrapping from head. Change-Id: I3de6d26b1af9038c6b92dec88667bfa734060a41 Reviewed-on: https://go-review.googlesource.com/c/go/+/166985 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* cmd/go: change the default value of GO111MODULE to 'on'Bryan C. Mills2019-03-111-2/+5
| | | | | | | | Fixes #30228 Change-Id: Ie45ba6483849b843eb6605272f686b9deffe5e48 Reviewed-on: https://go-review.googlesource.com/c/go/+/162698 Reviewed-by: Jay Conrod <jayconrod@google.com>
* cmd/go: drop support for binary-only packagesJay Conrod2019-03-061-9/+0
| | | | | | | | | | Fixes #28152 Change-Id: I98db923bdf8de7acf2df452313427bfea43b63c9 Reviewed-on: https://go-review.googlesource.com/c/go/+/165746 Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/go: remove work directory on usage errorIan Lance Taylor2019-03-011-2/+4
| | | | | | | | | | | | | | | | | | | Ensure that cmd/go consistently calls base.Exit rather than os.Exit, so that we don't incorrectly leave the work directory around on exit. Test this by modifying the testsuite to run all the tests with TMPDIR set to a temporary directory, and then check that no files are left behind in that temporary directory. Adjust a couple of tests to make this approach work. Updates #30500 Updates https://gcc.gnu.org/PR89406 Change-Id: Ib6a5fc8a288a6cf4713022baa2b8dfefad62ba34 Reviewed-on: https://go-review.googlesource.com/c/163237 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
* cmd/go: mention that binary packages are going awayIan Lance Taylor2019-01-251-8/+8
| | | | | | | | | | | Updates #28152 Fixes #29927 Change-Id: Iea692c90074d057a1733e98bca3928e8f3569585 Reviewed-on: https://go-review.googlesource.com/c/159557 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>