aboutsummaryrefslogtreecommitdiff
path: root/api/slack/slack.go
AgeCommit message (Collapse)Author
2026-01-03all: use SPDX license header formatShulhan
2024-03-05all: comply with linter recommendations #2Shulhan
HTTP request now implicitly create request with context. Any false positive related to not closing HTTP response body has been annotated with "nolint:bodyclose". In the example code, use consistent "// Output:" comment format, by prefixing with single space. Any comment on code now also prefixing with single space. An error returned without variables now use [errors.New] instead of [fmt.Errorf]. Any error returned using [fmt.Errorf] now wrapped using "%w" instead of "%s". Also, replace error checking using [errors.Is] or [errors.As], instead of using equal/not-equal operator. Any statement like "x = x OP y" now replaced with "x OP= y". Also, swap statement is simplified using "x, y = y, x". Any switch statement with single case now replaced with if-condition. Any call to defer on function or program that call [os.Exit], now replaced by calling the deferred function directly. Any if-else condition now replaced with switch statement, if possible.
2023-12-13all: fix linter warnings reported by reviveShulhan
There are some reports that I disagree with revive, in example, code should not declare the type after variables. In my opinion, on some cases, declaring the type make the code more readable and explicit. Since I did not want to add new configuration file, we changes it and follow revive for now.
2023-09-14all: fix variable shadowing as reported by shadow toolShulhan
The shadow tool [1] report a variable where its name is declared twice or more, in different scope. [1] https://pkg.go.dev/golang.org/x/tools@v0.13.0/go/analysis/passes/shadow
2023-09-11api/slack: fix error string that end with "\n"Shulhan
2022-05-09all: reformat all codes using gofmt 1.19 (the Go tip)Shulhan
2022-04-06all: replace any usage of ioutil package with os or ioShulhan
Since Go 1.16, the ioutil package has been deprecated. This changes replace any usage that use functions from ioutil package with their replacement from package os or package io.
2021-02-03api/slack: a simple API to post message to SlackShulhan
This package only depends on standard packages. Currently, it provide function to send message using incoming webhook URL.