0.1.8 • Published 2 years ago

@syumai/goplayground-node v0.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

goplayground-js

  • The Go Playground API client for Browsers / Node.js
  • Command line tool for Node.js is also available.

Installation

For Browsers

With npm

$ npm install --save @syumai/goplayground

With CDN

import { GoPlayground } from "https://unpkg.com/@syumai/goplayground/index.js";

For Node.js

$ npm install --save @syumai/goplayground-node

Usage

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);

Use goplayground-node as a CLI tool

Installation

$ npm install -g @syumai/goplayground-node

Usage

goplayground-node fmt example.go   # format src
goplayground-node run example.go   # run src
goplayground-node share example.go # publish src

Prior works

License

MIT

Author

syumai

0.1.8

2 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago