Skip to content

Releases: x1unix/go-playground

1.5.1

12 Aug 01:21
b72346d
Compare
Choose a tag to compare
  • Minor code quality improvements

1.5.0

05 Aug 05:13
b0beb05
Compare
Choose a tag to compare

Changelog

Examples and templates

In this release we added new section near Open menu button.
This section contains templates for code (such as unit tests) with Go snippets and tutorials which can be useful while learning Go.

Alt Text

Code snippets

To make coding faster, we added some code snippets that will allow to paste code expression using special alias.

Alt Text

Short list of available snippets:
* iferr - Error handling snippet
* switch - Quick switch declaration
* typestruct - Quickly declare struct
* fmtprintf - fmt.Printf shorthand

Full list of snippets available here

Custom fonts and font ligatures

This release adds editor font selection option to settings modal and programming font ligatures support.

Alt Text

Other minor changes and fixes

  • Fixed default fallback font for editor bug that affected Linux users
  • Added experimental update popup
  • Added changelog modal
  • Added "Submit Issue" and "Donate" options to menu
  • Updated Go version to 1.14 for WASM builds
  • Updated monaco-editor package that powers Better Go Playground

1.4.2

03 Aug 14:56
04a2c40
Compare
Choose a tag to compare

1.4.1

20 Apr 16:42
0e25b73
Compare
Choose a tag to compare

Changelog

  • Improved default Go program template (see: #13)
  • Fixed invalid "format" query parameter value error when trying to do Code Format
  • Change documentation URL to pkg.go.dev
  • Added optional Google Analytics support with GTAG environment variable.

1.4.0

31 Jan 07:37
45afb3e
Compare
Choose a tag to compare

Changelog

This minor release adds Go code errors report in editor

Go code errors report

image

We added background code syntax checker based on go/parser package. Checker is written in Go and compiled as WebAssembly binary.

If your browser supports WebAssembly, checker will start in separate worker thread and will report for syntax error in your code on code change.

1.3.0

27 Jan 06:37
461a072
Compare
Choose a tag to compare

Changelog

This release adds experimental support for WebAssembly and Monaco editor customization options.

Options menu

New options are available in Settings menu:
image

Monaco editor customization

Monaco editor now can be customized. We added a several options for customization (like Mini map switch toggle):

image

WebAssembly support

In this release we added experimental WebAssembly support.

By experimental we mean that some things might not work correctly, since we had to adapt wasm_exec.js bridge from Go SDK to connect Go programs to playground's UI and something can be broken.

WebAssembly to run Go programs locally in browser and also to call JavaScript on page. Your browser should support this technology in order to use it (see: caniuse.com).

Despite this, running Go programs in browser introduce some limitations: program has no access to file system and HTTP requests are limited to browser security model (CORS). See Go documentation for more intormation.

In future, we plan to mock filesystem (and maybe some other IO's) to make it able to play with them in playground.

To enable WebAssembly, go to Settings and in Build tab select WebAssembly runtime:

image

Browser communication

You can call JavaScript functions using syscall/js package.
Here is basic example that shows a simple alert:

package main

import (
	"fmt"
	"syscall/js"
)

func main() {
	fmt.Println("Hello World")
	js.Global().Call("alert", "hello")
}

image

1.2.0

21 Jan 15:50
005a351
Compare
Choose a tag to compare
  • fix: add ParseComments parser flag
  • Provide methods documentation
  • Wrap code snippets from GoDoc comments into markdown

1.1.0

21 Jan 06:00
1c085e6
Compare
Choose a tag to compare
  • Add Share snippet option
  • Move "Run" button to right side
  • Improve code complete for signature methods

See: #2

v1.0.0

20 Jan 16:21
Compare
Choose a tag to compare
Add debug server param to README