1
0
mirror of https://github.com/golang/go synced 2024-10-01 10:28:31 -06:00
Commit Graph

8 Commits

Author SHA1 Message Date
Andrew Bonventre
37fd46feae cmd/present: merge appengine and non-appengine files
Without changing the behavior of the present command for local
usage (using the local socket for running examples, defaulting to
the current directory for all content). Add flags and set them to
the appropriate values if running on App Engine.

Notably, since the Go files must be in the same directory as
app.yaml, the content root must be ./content/ to avoid listing
the present source files.

It also defaults to running example snippets via the HTTPTransport
(https://play.golang.org/compile) instead of locally when on App
Engine.

There are also some small cleanup code changes.

Update golang/go#28080

Change-Id: I40bb7923107614f88d2bfdffd34a824d4bacb3a1
Reviewed-on: https://go-review.googlesource.com/c/140841
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2018-10-10 21:11:20 +00:00
Daniel Martí
90b807ada4 all: fix a few issues found by unparam
In cmd/present, a mode was being passed to the function parse, but it
wasn't actually being used. Use it.

In go/ssa, checkFinalInstr received an idx integer but it doesn't
actually need it. Get rid of it.

Lastly, in imports, findImportStdlib always returned rename==false. Get
rid of that result parameter.

Change-Id: I719006b69ee80a3ef4b0ea24c1c206016a7e304b
Reviewed-on: https://go-review.googlesource.com/93596
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-02-13 22:52:51 +00:00
David R. Jenni
718875e4f9 x/tools: simplify and format code
Semi-mechanical changes using gofmt -s
and honnef.co/go/tools/cmd/gosimple.

Change-Id: I41bcf4bea5b16c4776b7cf6534b76aa59b3c022d
Reviewed-on: https://go-review.googlesource.com/37447
Reviewed-by: Alan Donovan <adonovan@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-02-28 14:15:42 +00:00
kortschak
8b3828f1c8 cmd/present: add request address to logged errors
Change-Id: I504d29d7196b8c61cff5e92bb4244a34c9c41fa8
Reviewed-on: https://go-review.googlesource.com/24331
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-22 22:42:38 +00:00
Shenghou Ma
14ecce811f cmd/present: skip the "golang.org" directory
Change-Id: I732194c22062c77c431dcec57f9ef832f1dc1afe
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/1512
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-14 23:37:49 +00:00
Andrew Gerrand
5ebbcd132f go.tools: use golang.org/x/... import paths
Rewrite performed with this command:
  sed -i '' 's_code.google.com/p/go\._golang.org/x/_g' \
    $(grep -lr 'code.google.com/p/go.' *)

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/170920043
2014-11-10 08:50:40 +11:00
Robert Daniel Kortschak
f563a1f0f5 go.tools/cmd/present: move dirListTemplate into template file
This change allows the directory front page to be more easily configurable.

Templates are now read only at start-up and stored in a map rather than re-parsed for each page rendering.

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/109080044
2014-07-08 15:27:33 +10:00
Andrew Gerrand
ca18093fea go.tools/cmd/present: add present tool
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/97030045
2014-05-05 14:55:27 -07:00