Notification of the clearning roles for tech lovers in Fukuoka β€οΈ
random-roles
.
βββ go.mod
βββ go.sum
βββ main.go
βββ payload
βββ attachment.go
βββ text.go
β― go get -u github.com/ashwanthkumar/slack-go-webhook
After git clone
, create a file .envrc
and describe the following.
You can find the Webhook's URL from https://slack.com/apps > Manage > Custom Integrations > Incoming Webhooks
export URL=https://hooks.slack.com/services/your/webhook's-url
If you build with OS and Architecture environment variables according to your env you will run, you can generated a binary file.
To specify a file name, execute the commnad with -o
option.
For example, if you want to generate with the name hoge
: go build -o hoge main.go
.
# Linux ( A binary file named "main" is output )
β― GOOS=linux GOARCH=amd64 go build main.go
# macOS ( A binary file named "main" is output )
β― GOOS=darwin GOARCH=amd64 go build main.go
# windowsOS ( A binary file named "main.exe" is output )
β― GOOS=windows GOARCH=amd64 go build main.go
In addition to executing the binary file generated earlier like this ./main
, you can also execute the following command.
β― go run main.go