/slacko

Slack bot meets Go Playground

Primary LanguageGoBSD 2-Clause "Simplified" LicenseBSD-2-Clause

slacko

Slack bot meets Go Playground

Demos

  • Single-line code

  • Multi-line code

Dependencies

go get golang.org/x/tools/cmd/goimports
go get github.com/nlopes/slack
go get github.com/hashicorp/golang-lru

Configuration

Config settings are stored in a JSON file, slacko.json, consisting of the following keys:

  • GoPlaygroundHost: Go Playground server (default: http://play.golang.org/compile?output=json)
  • BotName: bot name (default: slacko)
  • DebugOn: flag for enabling/disabling debug messages (default: true)
  • CacheSize: LRU cache size (default: 128)

In addition, slacko expects the environment variable, SLACK_API_TOKEN, to store your bot's API token. You can set it by running the following command:

export SLACK_API_TOKEN="your_slack_bot_api_token"

License

BSD 2-clause "Simplified" License