Skip to content
/ slacter Public

slacter is a simple slack client that implements io.Writer.

License

Notifications You must be signed in to change notification settings

yukpiz/slacter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Slacter

slacter is a simple slack client that implements io.Writer.

Installation

$ go get github.com/yukpiz/slacter

Usage

package main

import (
	"log"

	"github.com/yukpiz/slacter"
)

func main() {
	writer := slacter.New(&slacter.Config{
		Token:    "{{YOUR_SLACK_AUTH_TOKEN}}",
		Channel:  "test-channel",
		UserName: "yukpiz",
		IconURL:  "https://i.gyazo.com/30ff8e8938efed0382400961f3c59304.jpg",
	})

	logger := log.New(writer, "", log.Ldate|log.Ltime)

	logger.Println("Hello!")
	logger.Println("こんにちは!")
	logger.Println("안녕하세요!")
	logger.Println("您好!")
}

Result

How to generate slack's token.
https://get.slack.help/hc/en-us/articles/215770388-Create-and-regenerate-API-tokens

Author

Yuuki Zayasu(yukpiz)

License

MIT

About

slacter is a simple slack client that implements io.Writer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages