The WebAssembly Go Playground
github.com/ccbrown/wasm-go-playground
package main type Err string func (e Err) Error() string { return string(e) } func getSubject() (string, error) { // try replacing nil with Err("getSubject error") return "world", nil } func sayHello() error { println("Hello, " + try(getSubject()) + "!") return nil } func main() { if err := sayHello(); err != nil { panic(err) } }