drsect0r / goplayspace

Experimental Go Playground frontend written in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About Go Play Space

Go Play Space is an experimental alternative Go Playground frontend that is built in Go itself (using GopherJS), a Go→JavaScript transpiler, and Vecty, a React-like frontend library for GopherJS).


Try it yourself: https://goplay.space →

Main differences from the official Go Playground:

  1. Syntax highlighting
  2. Golang help lookup: double-click on e.g. package keyword or Println function name in source code, and you will see the relevant help topic.
  3. Live syntax error checking
  4. Error line highlighting (both for syntax errors and for errors returned from the compiler)
  5. Ability to highlight lines and blocks of code (like on Github, but better!) — just click on the line numbers. Use Shift and Ctrl to modify the selection
  6. Keyboard shortcuts (see button captions). Note that both Cmd and Ctrl keys work interchangeably
  7. Support for several UI themes
  8. Support for Fira Code font (if it is installed in your system)
  9. go imports is always run before running your code, so you don't usually have to worry about imports at all

Code execution is proxied to the official Go Playground, so your programs will work the same. Shared snippets are also stored on golang.org servers.

Runnning Locally

Download the package:

$ go get -u github.com/iafan/goplayspace/...

Compile both client-side code and server binary:

$ cd $GOPATH/src/github.com/iafan/goplayspace/bin
$ ./build-client && ./build-server

Run the server:

$ ./goplayspace

Then open http://localhost:8080/ in your browser.


Gopher vector logo by Takuya Ueda, licensed under the Creative Commons 3.0 Attributions license and based on original artwork by Renee French. See https://github.com/golang-samples/gopher-vector

Go proverbs: Rob Pike


Experimental Go Playground frontend written in Go



Language:Go 78.9%Language:CSS 11.6%Language:HTML 8.3%Language:Shell 1.2%