summaryrefslogtreecommitdiff
path: root/src/go
Commit message (Collapse)AuthorAgeFilesLines
* all: power64 is now ppc64Russ Cox2014-12-052-2/+2
| | | | | | | | | Fixes issue 8654. LGTM=austin R=austin CC=golang-codereviews https://codereview.appspot.com/180600043
* [dev.cc] all: merge default (8d42099cdc23) into dev.ccdev.ccRuss Cox2014-12-052-3/+6
|\ | | | | | | | | | | TBR=austin CC=golang-codereviews https://codereview.appspot.com/178700044
| * go/build: build $GOOS_test.go alwaysRuss Cox2014-11-242-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | We decided to build $GOOS.go always but forgot to test $GOOS_test.go. Fixes issue 9159. LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/176290043
* | [dev.cc] all: merge default (95f5614b4648) into dev.ccRuss Cox2014-11-232-25/+22
|\ \ | |/ | | | | | | | | TBR=austin CC=golang-codereviews https://codereview.appspot.com/177220044
| * go/parser: Use test-specific filesets to avoid races.Robert Griesemer2014-11-202-25/+22
| | | | | | | | | | | | | | | | | | | | | | | | Only affects test code. Fixes issue 9025. Fixes issue 9130. LGTM=r, adonovan R=adonovan, r CC=golang-codereviews https://codereview.appspot.com/180920043
* | [dev.power64] all: merge default into dev.power64Austin Clements2014-10-222-1/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | | | This brings dev.power64 up-to-date with the current tip of default. go_bootstrap is still panicking with a bad defer when initializing the runtime (even on amd64). LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/152570049
| * build: merge the great pkg/ rename into dev.power64Austin Clements2014-10-222-1/+3
| | | | | | | | | | | | | | | | | | This also removes pkg/runtime/traceback_lr.c, which was ported to Go in an earlier commit and then moved to runtime/traceback.go. Reviewer: rsc@golang.org rsc: LGTM
* | go/build: Return MultiplePackageError on importing a dir containing multiple ↵Jens Frederich2014-10-145-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | packages When the Import function in go/build encounters a directory without any buildable Go source files, it returns a handy NoGoError. Now if, instead it encounters multiple Go source files from multiple packages, it returns a handy MultiplePackageError. A new test for NoGoError and MultiplePackageError is also provided. Fixes issue 8286. LGTM=adg, rsc R=bradfitz, rsc, adg CC=golang-codereviews https://codereview.appspot.com/155050043 Committer: Russ Cox <rsc@golang.org>
* | go/build: update docs for GOOS.go changeBrad Fitzpatrick2014-10-061-6/+4
| | | | | | | | | | | | | | | | | | | | | | Forgotten in https://codereview.appspot.com/147690043/ Update Issue 8838 LGTM=r R=r CC=golang-codereviews, rsc https://codereview.appspot.com/152220045
* | go/build: do not consider "android.go" to be android-specificRob Pike2014-10-062-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A file name must have a non-empty underscore-separated prefix before its suffix matches GOOS. This is what the documentation already said but is not what the code did. Fixes issue 8838. This needs to be called out in the release notes. The he single affected file code.google.com/p/go.text/collate/tools/colcmp/darwin.go could use a renaming but works because it has a build tag inside. LGTM=adg, rsc R=golang-codereviews, adg, rsc CC=golang-codereviews https://codereview.appspot.com/147690043
* | go/format, cmd/gofmt: added missing comments, minor internal cleanupRobert Griesemer2014-09-301-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a minor cleanup following CL 142360043: The internal parse and format functions in both packages were almost identical - made them identical by adding an extra parameter, and documented them as identical. Eventually we should find a nice way to factor these functions out, but we cannot do this now while in prep for 1.4. No functionality change. LGTM=adonovan R=adonovan CC=golang-codereviews https://codereview.appspot.com/146520043
* | go/format, cmd/gofmt: fix issues with partial Go code with indentDmitri Shuralyov2014-09-292-82/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 5551. Fixes issue 4449. Adds tests for both issues. Note that the two issues occur only when formatting partial Go code with indent. The best way to understand the change is as follows: I took the code of cmd/gofmt and go/format, combined it into one unified code that does not suffer from either 4449 nor 5551, and then applied that code to both cmd/gofmt and go/format. As a result, there is now much more identical code between the two packages, making future code deduplication easier (it was not possible to do that now without adding public APIs, which I was advised not to do at this time). More specifically, I took the parse() of cmd/gofmt which correctly preserves comments (issue 5551) and modified it to fix issue where it would sometimes modify literal values (issue 4449). I ended up removing the matchSpace() function because it no longer needed to do some of its work (insert indent), and a part of its work had to be done in advance (determining the indentation of first code line), because that calculation is required for cfg.Fprint() to run. adjustIndent is used to adjust the indent of cfg.Fprint() to compensate for the body of wrapper func being indented by one level. This allows to get rid of the bytes.Replace text manipulation of inner content, which was problematic and sometimes altered raw string literals (issue 4449). This means that sometimes the value of cfg.Indent is negative, but that works as expected. So now the algorithm for formatting partial Go code is: 1. Determine and prepend leading space of original source. 2. Determine and prepend indentation of first code line. 3. Format and write partial Go code (with all of its leading & trailing space trimmed). 4. Determine and append trailing space of original source. LGTM=gri R=golang-codereviews, bradfitz, gri CC=golang-codereviews https://codereview.appspot.com/142360043 Committer: Robert Griesemer <gri@golang.org>
* | go/build: add go1.4 tag.Adam Langley2014-09-292-3/+4
| | | | | | | | | | | | | | LGTM=bradfitz R=bradfitz CC=golang-codereviews https://codereview.appspot.com/138000044
* | go/doc: document rationale for recent changeRobert Griesemer2014-09-181-1/+4
| | | | | | | | | | | | | | LGTM=adg R=adg CC=golang-codereviews https://codereview.appspot.com/143290043
* | go/doc: treat _ consts as exportedJosh Bleecher Snyder2014-09-185-9/+170
| | | | | | | | | | | | | | | | | | Fixes issue 5397. LGTM=adg R=gri, adg CC=golang-codereviews, rsc https://codereview.appspot.com/144110044
* | go/printer: don't reduce nesting depth twice if parentheses are present ↵Robert Griesemer2014-09-125-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | around an expr No impact on formatting on our repos. Fixes issue 8021. LGTM=adonovan R=adonovan, dvyukov CC=golang-codereviews https://codereview.appspot.com/142020043
* | go/printer, gofmt: don't align map entries for irregular inputsRobert Griesemer2014-09-113-7/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Details: Until now, when we saw a key:value pair that fit onto a single line, we assumed that it should be formatted with a vtab after the ':' for alignment of its value. This leads to odd behavior if there are more than one such pair on a line. This CL changes the behavior such that alignment is only used for the first pair on a line. This preserves existing behavior (in the std lib we have composite literals where the last line contains multiple entries and the first entry's value is aligned with the values on previous lines), and resolves this issue. No impact on formatting of std lib, go.tools, go.exp, go.net. Fixes issue 8685. LGTM=adonovan R=adonovan CC=golang-codereviews https://codereview.appspot.com/139430043
* | go/parser: fix (pathological) corner caseRobert Griesemer2014-09-082-0/+3
|/ | | | | | | | | | | | | | Inside a control clause (if ... {}), composite literals starting with a type name must be parenthesized. A composite literal used in the array length expression of an array composite literal is already parenthesized. Not a valid program, but syntactically is should be accepted. LGTM=adonovan R=adonovan CC=golang-codereviews https://codereview.appspot.com/142760043
* build: move package sources from src/pkg to srcRuss Cox2014-09-08125-0/+32623
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.