My own Golang Playground?

4,971 views
Skip to first unread message

RickyS

unread,
Oct 23, 2013, 7:15:28 AM10/23/13
to golan...@googlegroups.com
Is there an easy way for me to set up my own Golang playground on my own laptop, that I can use when disconnected from the Internet?

Ibrahim M. Ghazal

unread,
Oct 23, 2013, 7:33:47 AM10/23/13
to RickyS, golang-nuts

Chris Monson

unread,
Oct 23, 2013, 6:25:40 PM10/23/13
to golan...@googlegroups.com
I run the godoc server:

godoc -http=:6060 -play -index

Then navigate to localhost:6060 in your browser.

Andrew Gerrand

unread,
Oct 23, 2013, 11:03:09 PM10/23/13
to Chris Monson, golang-nuts

On 24 October 2013 02:25, Chris Monson <shi...@gmail.com> wrote:
godoc -http=:6060 -play -index

Then navigate to localhost:6060 in your browser.

This will send run requests to the sandbox server behind play.golang.org, and won't work if you're offline. misc/goplay is the answer for offline play.

Andrew

luz...@gmail.com

unread,
Oct 24, 2013, 1:36:18 AM10/24/13
to golan...@googlegroups.com, Chris Monson
 misc/goplay is the answer for offline play.

Is there a reason why it's not a tool, e.g. "go tool play", if it's part of the distribution anyway?

Chris Monson

unread,
Oct 24, 2013, 5:57:51 AM10/24/13
to Andrew Gerrand, golang-nuts

Interesting. I could have sworn that I've used that completely offline. Live and learn.

Aram Hăvărneanu

unread,
Oct 24, 2013, 6:03:11 AM10/24/13
to Chris Monson, Andrew Gerrand, golang-nuts
The playground is great for sharing. If you are disconnected, you
can't share. Since you already have to have Go to run misc/goplay, I
don't understand why would you want to use the playground since you
can have your regular workflow in your favorite editor.

--
Aram Hăvărneanu

fge...@gmail.com

unread,
Oct 25, 2013, 3:10:36 AM10/25/13
to Chris Monson, Andrew Gerrand, golang-nuts
gotour is easy to install to your local machine:
go get code.google.com/p/go-tour/gotour
cd $GOPATH/src/code.google.com/p/go-tour/gotour
go install
run the gotour executable.
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Jan Mercl

unread,
Oct 25, 2013, 6:54:42 AM10/25/13
to fge...@gmail.com, Chris Monson, Andrew Gerrand, golang-nuts
On Fri, Oct 25, 2013 at 9:10 AM, <fge...@gmail.com> wrote:
> gotour is easy to install to your local machine:
> go get code.google.com/p/go-tour/gotour

ok

> cd $GOPATH/src/code.google.com/p/go-tour/gotour
> go install

These two steps are a nop.

-j

angela....@gmail.com

unread,
Feb 7, 2014, 8:15:07 PM2/7/14
to golan...@googlegroups.com, fge...@gmail.com, Chris Monson, Andrew Gerrand
$ cd $GOROOT/misc/goplay
$ go run goplay.go
load http://localhost:3999/ in a web browser. Works perfectly for me.

NagaSrinivasVinodKumar Panda

unread,
May 24, 2016, 11:05:57 AM5/24/16
to golang-nuts
"go tool tour"
That is it.. You have all you need with it, to have your exploration offline..

mikael....@digital.cabinet-office.gov.uk

unread,
Jan 16, 2017, 10:36:14 PM1/16/17
to golang-nuts
Hi,

Could you please elaborate? I don't seem to have the `tour` tool.  How do you get it?  Is it third party? 
Reply all
Reply to author
Forward
0 new messages