1
0
mirror of https://github.com/golang/go synced 2024-11-05 15:56:12 -07:00
Commit Graph

1828 Commits

Author SHA1 Message Date
Nathan VanBenschoten
78a4eef087 cmd/oracle: Fix help message for Go Oracle usage.
Change-Id: Iba2c49c380ca81cd76b84c384ff468b8779f80e4
Reviewed-on: https://go-review.googlesource.com/15382
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-10-06 05:09:09 +00:00
Andrew Gerrand
3d33c30540 container/intsets: build correctly on App Engine
App Engine is amd64 but it doesn't support uploading assembly files.
Use the explicit build tag so that it selects the generic implementation
on App Engine.
This is required to deploy golang.org.

Change-Id: I7374c91961c53d59f6fdcc9ac98b8a9cec755b2c
Reviewed-on: https://go-review.googlesource.com/15246
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-10-06 04:34:19 +00:00
Burcu Dogan
f247eeaee6 godoc: don't drop the query params when redirecting
http://golang.org/issue/new?title=Title was being redirected to
https://github.com/golang/go/issues/new. The CL preserves the
query parameters during direct.

Change-Id: I3057ccd5304b00df53b664b71ea35ea05d313aa4
Reviewed-on: https://go-review.googlesource.com/15431
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-10-06 03:11:16 +00:00
Chris Broadfoot
365aedefa0 godoc/redirect: add listing path for /design and add tests.
Change-Id: I05d2f48d60e433ebf1d54fb3597db580644761e1
Reviewed-on: https://go-review.googlesource.com/15282
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Austin Clements <austin@google.com>
2015-10-06 01:31:28 +00:00
Alan Donovan
9d2ff756b7 go/loader: document cgo limitation
Change-Id: I8ce744d204fe2850d322b3095d04e8a399984983
Reviewed-on: https://go-review.googlesource.com/15391
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-10-05 16:43:58 +00:00
Alan Donovan
b7f0150d16 container/intsets: popcount: use POPCNT on amd64, Hacker's Delight algorithm on 386
This function accounts for 2% of "godoc -analysis=pointer"
and this change makes it twice as fast---and simpler.

Added test and benchmark.

Change-Id: I8578fa42dce34df057d81f6c522a7b4e0506d09d
Reviewed-on: https://go-review.googlesource.com/15211
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-10-01 19:57:28 +00:00
Chris Broadfoot
3f8a7a0787 godoc/redirect: add redirect for design proposals at /design/.
Change-Id: Ifa10c0477a7d79673f7f841b5aebb448742cc378
Reviewed-on: https://go-review.googlesource.com/15280
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-10-01 18:35:15 +00:00
Andrew Gerrand
e1d85eb8a3 playground, godoc: remove HK and RC from share-blocked country code list
These codes were initially included because of a miscommunication.
They should not be in the list at all.

Fixes golang/go#12747

Change-Id: I1a53e9c7be8edf5e1dbb95cd03101b93023a12c1
Reviewed-on: https://go-review.googlesource.com/15082
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-09-28 23:55:41 +00:00
Andrew Gerrand
10179a7e86 cmd/godoc: set Content-Type in fmt handler
Change-Id: I51b12838c65d67d4323e07d70f7c1e66fce23251
Reviewed-on: https://go-review.googlesource.com/14938
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-09-28 02:55:19 +00:00
Tamir Duberstein
0f7bc42285 godoc/static: have makestatic use the same code header comment as stringer
This allows Github to hide diffs in generated files. See:
https://github.com/github/linguist/blob/473282d/lib/linguist/generated.rb#L241

Change-Id: I0565c729dacfa7861e7da7eb66bc8021d191fc3e
Reviewed-on: https://go-review.googlesource.com/15074
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-09-28 01:46:00 +00:00
Mhd Sulhan
2b5f3dc0de cmd/godoc: make setup-godoc-app.bash more portable
Unlike in BSD, in GNU/Linux find option for -depth is without an
argument. To make the command compatible in both system, use
-mindepth and -maxdepth arguments.

Change-Id: Ie82736fd2c28b6fe0f64dbfc7272f0e0f0d8e8df
Reviewed-on: https://go-review.googlesource.com/15014
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-09-27 06:24:22 +00:00
Andrew Gerrand
6b41c776c8 cmd/godoc: always serve fmt handler, HTTPS fix redirection
Change-Id: Ib00a54f40b3c52c9bc6a07623259c5c82f9d28d9
Reviewed-on: https://go-review.googlesource.com/14933
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-09-25 02:10:07 +00:00
Andrew Gerrand
c206e42859 cmd/godoc: serve proxy paths without host enforcer
Change-Id: I4647c1e18df3ea441c5220cd03fe6163794b7e84
Reviewed-on: https://go-review.googlesource.com/14862
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-09-23 05:23:18 +00:00
Andrew Gerrand
e83bc56334 godoc/{dl,proxy,short}: move packages out of Google's internal repo
These were built inside Google but have been in production for years.
Move them into the public tools repository so that they can be more
easily maintained.

This is step one to moving the entire golang.org deployment process out
of Google's internal source repository.

Change-Id: I72f875c5020b3f58f1c0cea1d19268e0f991833f
Reviewed-on: https://go-review.googlesource.com/14842
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-09-23 03:53:05 +00:00
Andrew Gerrand
40b1b219de cmd/godoc: restrict requests to HTTPS and canonical host names
Fixes golang/go#12684

Change-Id: Ibb49e604bfd92c902c9fd2bf9506ded60b2a9d8d
Reviewed-on: https://go-review.googlesource.com/14814
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-09-22 23:49:55 +00:00
Rob Pike
5a90b2958f vet: put a notice in main that this version of vet is not the place to update
Change-Id: I295d1e902626a3f5edd09a3b594a2059530ca821
Reviewed-on: https://go-review.googlesource.com/14820
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-09-21 17:48:06 +00:00
Ford Hurley
0ced849c61 tools/cmd/vet: check only first rune of example suffix
The documentation for the testing package states only that "The suffix
must start with a lower-case letter."

Fixes golang/go#12663

Change-Id: I9b079b105a7c9680325fed442c42adcf3b75055e
Reviewed-on: https://go-review.googlesource.com/14760
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-09-21 00:24:47 +00:00
Alan Donovan
8049553ca8 go/ssa: use sync.Once instead of sync.atomic
This adds a missing memory barrier at the end of Package.Build.

Change-Id: Ife35d5ad5a48ba121f35656fef682863d4f2aef6
Reviewed-on: https://go-review.googlesource.com/14761
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-09-18 15:11:51 +00:00
Andrew Gerrand
1d593709ec cmd/tip: serve talks.golang.org
Also make health check test the backup process.

Change-Id: I9d2ed2780c07bb08683d231fccad4674c2ac22a1
Reviewed-on: https://go-review.googlesource.com/14668
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-09-18 04:55:56 +00:00
Andrew Gerrand
ac6d9c1d84 cmd/present: include Google Analytics tracking code for talks.golang.org
This was formerly inserted by some deployment scripts. Putting it in
the code here simplifies deployment at little cost to other users.

Change-Id: Ic092bb560c4c90e0e5bc6f9f33426b35214d613d
Reviewed-on: https://go-review.googlesource.com/14741
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-09-18 04:43:10 +00:00
Andrew Gerrand
51ebb3f1be cmd/present: move critical _ import to another file
This was preventing the playground /compile and /share handlers
from being registered under Managed VMs.

Change-Id: I690bd50abc2f42b30956e734903d09487f712d4a
Reviewed-on: https://go-review.googlesource.com/14665
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-09-17 03:09:26 +00:00
Andrew Gerrand
ffb6076c75 playground: recognize managed vm's as being "on app engine"
Change-Id: I117b113e2782cab1180e6f56e1869525564ab18f
Reviewed-on: https://go-review.googlesource.com/14663
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-09-17 02:42:04 +00:00
Andrew Gerrand
25693e10e1 cmd/tip: refactor tipgodoc into general-purpose tip server
This will allow us to serve blog.golang.org and talks.golang.org from
the latest sources without re-deploying.

Change-Id: I2399a8a7eb60a0c6648916052f5f129cb826d546
Reviewed-on: https://go-review.googlesource.com/14662
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-09-17 02:04:37 +00:00
Andrew Gerrand
6c387a1d07 cmd/tipgodoc: implement health checking and enable auto-scaling
Change-Id: I860d0913d051616d7958a88a3c7b11a26ec1d4d6
Reviewed-on: https://go-review.googlesource.com/14661
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-09-17 01:18:34 +00:00
Andrew Gerrand
374b14e99b cmd/tipgodoc: fix deployment instructions
Change-Id: Iaa8e1e61f5c6966a66fc613173853846408584b5
Reviewed-on: https://go-review.googlesource.com/14636
Reviewed-by: Chris Broadfoot <cbro@google.com>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-09-17 00:09:34 +00:00
Matt T. Proud
c262de870b tools/cmd/vet: Sort checks list alphabetically.
The existing list of checks in doc.go has become somewhat unwieldy.
This commit is purely cosmetic and sorts the list alphabetically keyed
by the flag name.

Change-Id: Ibb56357f9d4667d199acc6637dc28f6e17903046
Reviewed-on: https://go-review.googlesource.com/14558
Reviewed-by: Rob Pike <r@golang.org>
2015-09-15 17:18:38 +00:00
Matt T. Proud
871b75fbfc tools/cmd/vet: Incorporate comments from r@.
This commit fixes a few defects from a25a8d567b:

(1.) Making the top-level vars in main consistent w.r.t. documentation
     formatting, and the-like.

(2.) Removing of one-use top-level is-test predicate.

(3.) Including documentation of what the validation does and when.

Change-Id: I19b34d25836bb2af865219d18600e1add78c3fd7
Reviewed-on: https://go-review.googlesource.com/14557
Reviewed-by: Rob Pike <r@golang.org>
2015-09-15 16:08:13 +00:00
Matt T. Proud
a25a8d567b tools/cmd/vet: Create vet checks for examples.
In spite of https://blog.golang.org/examples and
http://golang.org/pkg/testing/#pkg-examples, a number of internal Go
authors have found writing documentation examples to be problematic in
the sense that the syntax is error-prone due to loose coupling with
identifiers found in the source corpus.

This commit introduces a suite of validations for documentation
examples:

    Overall:
    - Correct suffices, if present
    - Niladic function argument and return signatures

    func Example() {}
    func ExampleF() {}
    - F exists
    func ExampleT() {}
    - T exists
    func ExampleT_M() {}
    - T exists
    - M exists within T

Further, if the example is in `package foo_test`, vet attempts to
resolve the respective lookups in `package foo`, if `package foo`
exists (cf., `package stringutil_test`).

Change-Id: Ifa13906363541ebf28325681b749b14b7f8b103d
Reviewed-on: https://go-review.googlesource.com/11982
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-09-15 07:54:34 +00:00
Andrew Gerrand
d868c356db imports: update static stdlib index to go1.5
Fixes golang/go#12609

Change-Id: Ic7efa796d50037a3b0fbf87a748c07bd41f07e02
Reviewed-on: https://go-review.googlesource.com/14576
Reviewed-by: Dave Cheney <dave@cheney.net>
2015-09-15 05:17:18 +00:00
Andrew Gerrand
31971b7521 godoc: fix source links for cmd/*
Fixes golang/go#12159

Change-Id: Id498443171cbdf0fe9808745a79edc863d836db1
Reviewed-on: https://go-review.googlesource.com/14001
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-09-11 00:20:26 +00:00
Andrew Gerrand
1330b289ad godoc: hide and block share functionality from specific countries
This will permit us to serve *.golang.org to Chinese users.

Change-Id: I5217753aa67931522c7e6be106477534c99a20b2
Reviewed-on: https://go-review.googlesource.com/14194
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-09-02 05:52:45 +00:00
Andrew Gerrand
4df6ae9fad playground: block share functionality from specific countries
This will permit us to serve *.golang.org to Chinese users.

Change-Id: If184760d7f4c9e49a3df3785c15af770958413de
Reviewed-on: https://go-review.googlesource.com/14190
Reviewed-by: Jason Buberel <jbuberel@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-09-02 05:51:01 +00:00
Alan Donovan
b9fbbb8e31 refactor/eg: refactor to break dependency on go/loader
Change-Id: I0a865a694b911437944743f60bfaa2a937d85c9a
Reviewed-on: https://go-review.googlesource.com/14133
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-09-01 14:26:06 +00:00
Alan Donovan
af0fde4393 cmd/fiximports: -replace flag specifies canonical packages in absence of import comments
+ Tests.

Change-Id: I0544546dda93d24aedbbfe1ffdc6882e76bfb3f8
Reviewed-on: https://go-review.googlesource.com/12940
Reviewed-by: Jason Buberel <jbuberel@google.com>
2015-09-01 14:23:39 +00:00
Andrew Gerrand
513c731aab cmd/godoc: add x/arch repo to list
Fixes golang/go#12393

Change-Id: I0b56c36dec11a6c2fddcc092867f24701815dce3
Reviewed-on: https://go-review.googlesource.com/14145
Reviewed-by: Dave Cheney <dave@cheney.net>
2015-09-01 03:09:27 +00:00
Alan Donovan
afcda55b39 go/ssa: rename some API features (incompatible change)
Rename the following exported names:
	(*Program).BuildAll → Build
	(*Program).Method   → MethodValue
	Package.Object      → Pkg
Also:
	(*Function).pkgobj  → pkg

Change-Id: Iff7e6c240ebe6786ba759278ac0daa3d66698013
Reviewed-on: https://go-review.googlesource.com/14134
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-08-31 22:20:12 +00:00
Alan Donovan
e21b7325f7 refactor/lexical: delete package
It is possible to reconstruct the lexical environment at any point
using only Object and Scope positions; see CL 9544 for an example.

Change-Id: I1268f9490c072ceb1c4d044df2e9c49678d73dfd
Reviewed-on: https://go-review.googlesource.com/14131
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-08-31 21:14:04 +00:00
Alan Donovan
25bacdead0 refactor/rename: fix build breakage (due to go/types version skew)
Change-Id: Id798ff0acdc9d4a83efe1b760ca32ede6a1aa5bb
Reviewed-on: https://go-review.googlesource.com/14132
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-08-31 21:13:35 +00:00
Alan Donovan
03e05ec5a5 refactor/rename: eliminate dependency on refactor/lexical package
so that we can delete that package.

lexicalLookup reconstructs the lexical scope from the existing tree of
types.Scope blocks, using source position information to determine
which prefix of declarations are visible.  (Inspired by Russ's
lookupAtPos in github.com/rsc/grind/grinder.)

forEachLexicalRef implements the part of the recursion from
refactor/lexical that enumerates the ast.Idents that use lexical
lookup.  (I would still like to eliminate this redundant logic by
having go/types record environments, as in CL 9493.)

Change-Id: I040ab33b508aad2dc68fd48850fe92ec072045d1
Reviewed-on: https://go-review.googlesource.com/9544
Reviewed-by: Sameer Ajmani <sameer@golang.org>
2015-08-31 20:58:11 +00:00
Alan Donovan
b9f1f6a3c1 go/loader: in stdlib_test, skip packages that depend on vendoring
until vendoring support is added (soon).

Change-Id: I954514b5c6b82622c0c831a289ccdcc16dbd37f8
Reviewed-on: https://go-review.googlesource.com/14130
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-08-31 20:55:27 +00:00
Robert Griesemer
b48dc8da98 cmd/gotype: keep gotype working with Go1.4
Fixes #12305.

Change-Id: Ib9e36621708ab35fd0e685aaca37d8640f265366
Reviewed-on: https://go-review.googlesource.com/13899
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-08-25 03:53:50 +00:00
Robert Griesemer
12c48ced94 cmd/gotype: use std lib go/types instead of x/tools version
Change-Id: I89ba20512129d0557f3f606d8242472d78ea37a9
Reviewed-on: https://go-review.googlesource.com/13898
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-08-24 21:28:19 +00:00
Nathan Youngman
6c9aff3429 website: fix JavaScript error on website and blog in non-ES6 browsers
In Safari a JavaScript error in personalizeInstallInstructions prevents
the featured articles from displaying. startsWith is an ES6-only feature.

Fixes golang/go#12283

Change-Id: I9f471362cdac0243758e482ed3a21b0d6aa48c8b
Reviewed-on: https://go-review.googlesource.com/13841
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-08-24 08:00:06 +00:00
Russ Cox
93604a3dc2 go/loader: fix fd leak and limit calls to ioutil.ReadDir
This makes 'ulimit -n 128; go test -short -v' pass.
It did not before, and that was breaking the openbsd/386 builder.

For golang/go#11811.

Change-Id: Idfdb2f4007ed06c6084486c0e58a561add552d2c
Reviewed-on: https://go-review.googlesource.com/13695
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-08-18 23:39:26 +00:00
Andrew Gerrand
9f2124fb70 cmd/tipgodoc: change capitalization of 'Authors' to be consistent
Change-Id: I040007a2b9bfa3388f3fbed839b2e5c6853925b3
Reviewed-on: https://go-review.googlesource.com/13596
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-08-16 08:15:44 +00:00
David R. Jenni
4f50f44d7a imports: fix bug, where unused named import is mistaken for unnamed import.
Fixes #8149.

Change-Id: Ia3d318f70981b2032a71d3fd32eaffba20cfbcbd
Reviewed-on: https://go-review.googlesource.com/13371
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2015-08-12 17:18:37 +00:00
Andrew Gerrand
b8e61d42ca cmd/godoc: remove obsolete vet redirect
The vet command has been moved back to the core repo.

Fixes golang/go#12088

Change-Id: I26e5ed6a8c7915af1cf96db4c3a16a2e812ab394
Reviewed-on: https://go-review.googlesource.com/13460
Reviewed-by: Rob Pike <r@golang.org>
2015-08-10 01:42:01 +00:00
Robert Griesemer
d02228d185 cmd/callgraph: exclude test for Android
For golang/go#11811.

Change-Id: I4cec398a0a6d43f3297c205f73193522928a5b31
Reviewed-on: https://go-review.googlesource.com/13280
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-08-06 01:46:44 +00:00
Robert Griesemer
958ab4f550 x/tools: disable tests not supported on Android
For golang/go#11811.

Change-Id: Icf16a2d47fcf2fe0d79dd825ccb851a3d63a660f
Reviewed-on: https://go-review.googlesource.com/13268
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-08-06 00:36:03 +00:00
Robert Griesemer
63f996ec75 cmd/stringer: exclude end-to-end test for Android
Change-Id: I37224abb3d9ca902ed23d520493f3b2794ef0471
Reviewed-on: https://go-review.googlesource.com/13261
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-08-05 22:44:14 +00:00