summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kiryukhin <alexander@kiryukhin.su>2019-02-01 01:30:50 +0300
committerAlexander Kiryukhin <alexander@kiryukhin.su>2019-02-01 01:30:50 +0300
commitb0f43441b50387fc045e5ef1288290d8ea52437f (patch)
tree066d508271a50e385788498a5a936b95df9abf1e
parent3467e599acdfc2c4094997a7723126d823c2c3d0 (diff)
-rw-r--r--members.go6
-rw-r--r--message.go6
2 files changed, 6 insertions, 6 deletions
diff --git a/members.go b/members.go
index 81f0f15..a773dbc 100644
--- a/members.go
+++ b/members.go
@@ -7,12 +7,12 @@ import (
func getRandomMember(team []string, except string) string {
rand.Seed(time.Now().Unix())
- ok := false
+ found := false
member := ""
- for !ok {
+ for !found {
n := rand.Int() % len(team)
member = team[n]
- ok = member != except
+ found = member != except
}
return member
}
diff --git a/message.go b/message.go
index cb13e75..e9aaf74 100644
--- a/message.go
+++ b/message.go
@@ -10,9 +10,9 @@ import (
func sendMessage(responseUrl, origText, text string) error {
jm := message{
- Text: origText,
- //ResponseType: "in_channel",
- Attachments: []Attachment{{Text: text, Color: "#36a64f"}},
+ Text: origText,
+ ResponseType: "in_channel",
+ Attachments: []attachment{{Text: text, Color: "#36a64f"}},
}
b, _ := json.Marshal(jm)