Releases: x1unix/go-playground
1.5.1
1.5.0
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.
Code snippets
To make coding faster, we added some code snippets that will allow to paste code expression using special alias.
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.
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
1.4.1
1.4.0
Changelog
This minor release adds Go code errors report in editor
Go code errors report
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
Changelog
This release adds experimental support for WebAssembly and Monaco editor customization options.
Options menu
New options are available in Settings menu:
Monaco editor customization
Monaco editor now can be customized. We added a several options for customization (like Mini map switch toggle):
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:
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")
}