Skip to content

Commit 3ecfc2b

Browse files
Merge pull request #1 from anthonycorbacho/feat/QOL-update
Quality of Life update
2 parents a6a2283 + 44dfa7d commit 3ecfc2b

5 files changed

Lines changed: 22 additions & 3 deletions

File tree

.github/workflows/test.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Slack Webhook Unit Test
2+
on:
3+
pull_request:
4+
types: [ opened, synchronize ]
5+
paths:
6+
- "*.go"
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Install Go
14+
uses: actions/setup-go@v4
15+
with:
16+
go-version: 1.20.x
17+
- name: Run Test
18+
run: go test -v -race -p=6 -cpu=1,4 ./...
File renamed without changes.

doc.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
// Package slack allows application to seamlessly send Slack Message by using the Incoming Webhooks API from Slack.
2-
//
32
package slack

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
module github.com/anthonycorbacho/slack-webhook
2+
3+
go 1.20

slack.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"net/http"
99
)
1010

11-
// Send send message (Payload) to the given slack hook URL.
11+
// Send sends message (Payload) to the given slack hook URL.
1212
func Send(hookURL string, message Message) error {
1313
bts, err := json.Marshal(message)
1414
if err != nil {
@@ -40,7 +40,7 @@ func Send(hookURL string, message Message) error {
4040
return nil
4141
}
4242

43-
// Message contains the slack message.
43+
// Message represent a Slack message.
4444
type Message struct {
4545
Parse string `json:"parse,omitempty"`
4646
Username string `json:"username,omitempty"`

0 commit comments

Comments
 (0)