{"id":37104101,"url":"https://github.com/greengeorge/go-slack","last_synced_at":"2026-01-14T12:35:30.559Z","repository":{"id":143754324,"uuid":"114521780","full_name":"GreenGeorge/go-slack","owner":"GreenGeorge","description":"Go library to simplify communicating with the Slack API. Mainly for my own apps. In active development.","archived":false,"fork":false,"pushed_at":"2017-12-23T06:57:10.000Z","size":112,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T03:46:33.175Z","etag":null,"topics":["api","golang","slack"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GreenGeorge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-17T08:41:30.000Z","updated_at":"2017-12-19T09:40:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"d1484207-eda2-445c-b8c8-e1efa0fe1e98","html_url":"https://github.com/GreenGeorge/go-slack","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/GreenGeorge/go-slack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenGeorge%2Fgo-slack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenGeorge%2Fgo-slack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenGeorge%2Fgo-slack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenGeorge%2Fgo-slack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GreenGeorge","download_url":"https://codeload.github.com/GreenGeorge/go-slack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenGeorge%2Fgo-slack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","golang","slack"],"created_at":"2026-01-14T12:35:29.831Z","updated_at":"2026-01-14T12:35:30.540Z","avatar_url":"https://github.com/GreenGeorge.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Go-Slack\n========\n[![CircleCI](https://circleci.com/gh/GreenGeorge/go-slack/tree/master.svg?style=shield)](https://circleci.com/gh/GreenGeorge/go-slack/tree/master)\n[![GoDoc](https://godoc.org/github.com/greengeorge/go-slack?status.svg)](http://godoc.org/github.com/greengeorge/go-slack)\n\nReally simple Go library for programatically creating and delivering Slack messages. Just BYO [access token][2] and `http.Client`. Great for creating `slack` reports with reusable components.\n\n## Usage\n\nInstall it `$ go get github.com/greengeorge/go-slack`\n\n```go\n...\nimport \"github.com/GreenGeorge/go-slack\"\n\n// Bring your own Client or just pass nil\nclient := http.Client{Timeout: time.Second * 10}\n\n// Instantiate go-slack with your access token)\nsl := slack.New(\"xoxp-XXXXXXXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXXXXXXX\", client)\n\n// Prepare attachments\nattachmentFoo := slack.Attachment{\n  Title:          \"Foo\",\n  Text:           \"You've got Foo\",\n  Color:          \"#f5b000\",\n  AttachmentType: \"default\",\n  Fallback:       \"You've got Foo\",\n}\nattachmentBar := slack.Attachment{\n  Title:          \"Bar\",\n  Text:           \"You've got Bar\",\n  Color:          \"#00e6f5\",\n  AttachmentType: \"default\",\n  Fallback:     \"You've got Bar\",\n}\n\n// Prepare reusable actions\nactionBaz := slack.Action{\n  Name:   \"Baz\",\n  Text:   \"Send out the Baz\",\n  Type:   \"button\",\n  Value:  \"baz\",\n  Style:  \"primary\",\n}\nactionFiz := slack.Action{\n  Name:   \"Fiz\",\n  Text:   \"Send out the Fiz\",\n  Type:   \"button\",\n  Value:  \"fiz\",\n  Style:  \"danger\",\n}\n\n// Mix and match them!\nattachmentFoo.AddAction(actionBaz, actionFiz)\nattachmentBar.AddAction(actionFiz)\n\n// Setup base messages\nmessageA := slack.NewMessage(\"FooBar\", \"CHANNELIDA\", \":skull:\")\nmessageB := slack.NewMessage(\"BazFiz\", \"CHANNELIDB\",\":skull:\")\n\n// Assemble the final message\n// Add a text message maybe\nmessageA.Text = \"Kunci kesuksesan adalah key of success\"\n\n// Add the attachments to the message\nmessageA.AddAttachment(attachmentFoo, attachmentBar)\nmessageB.AddAttachment(attachmentBar, attachmentFoo)\n\n// Send them out!\n_, err := sl.PostMessage(messageA)\n_, err := sl.PostMessage(messageB)\n\n...\n```\n\n*et voilà*\n\n![Example result][example]\n\n## API Coverage\nDefinitely doesn't cover the whole Slack API. Just the parts I need for my use cases (easy message creation and sending by Slack's [Web API][1]). Contributions are most welcome.\n\nPlease note the message struct schema might also be incomplete. I've yet to find one list that covers everything.\n\n[1]:https://www.google.com\n[2]:https://api.slack.com/apps\n[example]:example/example-result.jpg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreengeorge%2Fgo-slack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreengeorge%2Fgo-slack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreengeorge%2Fgo-slack/lists"}