Skip to content

Instantly share code, notes, and snippets.

@kosh04
Created October 1, 2015 09:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kosh04/3949827de5b36d8bfdee to your computer and use it in GitHub Desktop.
Save kosh04/3949827de5b36d8bfdee to your computer and use it in GitHub Desktop.
Go Playground をコマンドラインから叩く
#/bin/sh
# Description: Go Playground command line interface
# Link: http://blog.golang.org/playground
# Usage:
# - go-playground.sh FILENAME
# - go-playground.sh < FILENAME
compile_url=https://play.golang.org/compile
version=2
curl -s -X POST --data "version=$version" --data-urlencode "body@${1:--}" $compile_url
@kosh04
Copy link
Author

kosh04 commented Oct 1, 2015

出力の整形は以下を参照

ただし標準で提供されている go run を利用した方が簡単だと思う

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment