Skip to content

loveratory/slack-blockkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blockkit

blockkit provides structs can convert to Slakc Block Kit JSON with json.Marshal.

This project only implemented subset of Block Kit currently.

Install

go get github.com/loveratory/slack-blockkit

Example

See ./cmd/example.

$ go run ./cmd/example
[
  {
    "elements": [
      {
        "image_url": "https://github.com/otofune.png",
        "alt_text": "icon",
        "type": "image"
      },
      {
        "text": "@otofune | 2020/05/08 07:54",
        "type": "plain_text"
      }
    ],
    "type": "context"
  },
  {
    "text": {
      "text": "Hello world~",
      "type": "plain_text"
    },
    "type": "section"
  },
  {
    "type": "divider"
  }
]

About

Build Slack Block Kit JSON with struct only

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages