Skip to content

Commit b04d485

Browse files
Merge pull request #5 from stakater/fix-lint-issues
Fix lint Issues
2 parents 277b457 + 1834a0b commit b04d485

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

controllers/util/testUtil.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ func (t *TestUtil) DeleteChannel(name string, namespace string) {
8888
// TryDeleteChannel - Tries to delete channel if it exists, does not fail on any error
8989
func (t *TestUtil) TryDeleteChannel(name string, namespace string) {
9090
channelObject := &slackv1alpha1.Channel{}
91-
t.k8sClient.Get(t.ctx, types.NamespacedName{Name: name, Namespace: namespace}, channelObject)
92-
t.k8sClient.Delete(t.ctx, channelObject)
91+
_ = t.k8sClient.Get(t.ctx, types.NamespacedName{Name: name, Namespace: namespace}, channelObject)
92+
_ = t.k8sClient.Delete(t.ctx, channelObject)
9393
req := reconcile.Request{NamespacedName: types.NamespacedName{Name: name, Namespace: namespace}}
94-
t.r.Reconcile(req)
94+
_, _ = t.r.Reconcile(req)
9595
}
9696

9797
// CreateNamespace creates a namespace in the kubernetes server

pkg/slack/mock/data.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package mock
22

33
import (
4-
"encoding/json"
54
"fmt"
65
"time"
76

@@ -111,12 +110,6 @@ func getConversationPurposeResponse(purpose string) string {
111110
nowAsJSONTime(), purpose, BotID, nowAsJSONTime(), 0)
112111
}
113112

114-
func getChannelPurposeResponse(purpose string) string {
115-
return fmt.Sprintf(templateChannelJSON, PublicConversationID, ConversationName,
116-
nowAsJSONTime(), BotID, ConversationName, "false", "random topic", BotID,
117-
nowAsJSONTime(), purpose, BotID, nowAsJSONTime(), 0)
118-
}
119-
120113
const ExistingUserEmail = "[email protected]"
121114

122115
var templateUserJSON = `
@@ -171,13 +164,3 @@ var userNotFoundJSON = `
171164
func nowAsJSONTime() slack.JSONTime {
172165
return slack.JSONTime(time.Now().Unix())
173166
}
174-
175-
func asChannelObject(j string) *slack.Channel {
176-
channel := &slack.Channel{}
177-
err := json.Unmarshal([]byte(j), &channel)
178-
179-
if err != nil {
180-
panic(err)
181-
}
182-
return channel
183-
}

0 commit comments

Comments
 (0)