Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 545 Bytes

README.md

File metadata and controls

40 lines (30 loc) · 545 Bytes

golack

娯楽で作ったgolack

Description

Simple Incoming Webhooks in Go

Usage

package main

import "github.com/operando/golack"

func main() {
	slack := golack.Slack{
		Text:      "@operando: test",
		Username:  "sushi",
		IconEmoji: ":sushi:",
		Channel:   "#general",
		LinkNames: true,
	}
	p := golack.Payload{
		slack,
	}
	w := golack.Webhook{
		"webhook_url", // your Incoming WebHooks URL for Slack
	}
	golack.Post(p, w)
}

Install

To install, use go get:

go get github.com/operando/golack