Skip to content

vensder/slack-go-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang Slack Bot

Go Docker

How to run pre-build docker

docker run --rm --name slagobot -d vensder/slack-go-bot -slack-token xoxb-000000-xxxxxxxx-xxxxxxxxxxxxxxx

Or use environment variable "SLACK_TOKEN":

export SLACK_TOKEN='xoxb-000000-xxxxxxxx-xxxxxxxxxxxxxxx'
docker run --rm --name slagobot -d vensder/slack-go-bot

alt text

How to run from source code

git clone https://github.com/vensder/slack-go-bot.git
cd slack-go-bot

Run this bot and pass your Slack token:

go run slagobot.go -slack-token xoxb-000000-xxxxxxxx-xxxxxxxxxxxxxxx

Or use environment variable "SLACK_TOKEN":

export SLACK_TOKEN='xoxb-000000-xxxxxxxx-xxxxxxxxxxxxxxx'
go run slagobot.go

How to build executalbe on Linux and run it

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -o slagobot -v -x slagobot.go
chmod +x slagobot
./slagobot.go -slack-token xoxb-000000-xxxxxxxx-xxxxxxxxxxxxxxx

How to build docker image and run container

docker build -t slagobot .
docker run --rm --name slagobot -d slagobot -slack-token  xoxb-000000-xxxxxxxx-xxxxxxxxxxxxxxx

About

Golang Slack bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published