$ npm install --save @syumai/goplayground
import { GoPlayground } from "https://unpkg.com/@syumai/goplayground/index.js";
$ npm install --save @syumai/goplayground-node
import { GoPlayground } from "https://deno.land/x/goplayground@0.1.6/index.ts";
import { GoPlayground } from "@syumai/goplayground"; // or "@syumai/goplayground-node"
const src = `package main
func main() {}`
const gp = new GoPlayground();
// format src
await gp.format(src);
// run src
await gp.compile(src);
// publish src
await gp.share(src);
goplayground-node
as a CLI tool$ npm install -g @syumai/goplayground-node
goplayground-node fmt example.go # format src
goplayground-node run example.go # run src
goplayground-node share example.go # publish src
MIT
syumai