From f4c3ec4ed846f4fa53525e2af87abf25b6b0c081 Mon Sep 17 00:00:00 2001 From: Ayush Thakur <100013900+ayusht2810@users.noreply.github.com> Date: Tue, 23 Jan 2024 16:45:11 +0530 Subject: [PATCH] [MM-100] Fix failing CI (#63) --- server/mocks/mock_client.go | 2 +- server/mocks/mock_store.go | 2 +- server/plugin/api.go | 2 +- server/plugin/api_test.go | 2 +- server/plugin/auth_token_test.go | 4 ++-- server/plugin/hooks.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/mocks/mock_client.go b/server/mocks/mock_client.go index 8e55f0d..393136a 100644 --- a/server/mocks/mock_client.go +++ b/server/mocks/mock_client.go @@ -5,8 +5,8 @@ package mock_plugin import ( - serializer "github.com/mattermost/mattermost-plugin-servicenow-virtual-agent/server/serializer" gomock "github.com/golang/mock/gomock" + serializer "github.com/mattermost/mattermost-plugin-servicenow-virtual-agent/server/serializer" reflect "reflect" ) diff --git a/server/mocks/mock_store.go b/server/mocks/mock_store.go index 9b05292..b715a67 100644 --- a/server/mocks/mock_store.go +++ b/server/mocks/mock_store.go @@ -5,8 +5,8 @@ package mock_plugin import ( - serializer "github.com/mattermost/mattermost-plugin-servicenow-virtual-agent/server/serializer" gomock "github.com/golang/mock/gomock" + serializer "github.com/mattermost/mattermost-plugin-servicenow-virtual-agent/server/serializer" reflect "reflect" ) diff --git a/server/plugin/api.go b/server/plugin/api.go index c91f3bb..a61ff7b 100644 --- a/server/plugin/api.go +++ b/server/plugin/api.go @@ -23,7 +23,7 @@ import ( ) // ServeHTTP demonstrates a plugin that handles HTTP requests. -func (p *Plugin) ServeHTTP(c *plugin.Context, w http.ResponseWriter, r *http.Request) { +func (p *Plugin) ServeHTTP(_ *plugin.Context, w http.ResponseWriter, r *http.Request) { p.API.LogDebug("New request:", "Host", r.Host, "RequestURI", r.RequestURI, "Method", r.Method) p.initializeAPI().ServeHTTP(w, r) diff --git a/server/plugin/api_test.go b/server/plugin/api_test.go index cfadb23..f92f502 100644 --- a/server/plugin/api_test.go +++ b/server/plugin/api_test.go @@ -29,7 +29,7 @@ import ( type panicHandler struct { } -func (ph panicHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { +func (ph panicHandler) ServeHTTP(_ http.ResponseWriter, _ *http.Request) { panic("bad handler") } diff --git a/server/plugin/auth_token_test.go b/server/plugin/auth_token_test.go index 2dd8de0..2bac2f0 100644 --- a/server/plugin/auth_token_test.go +++ b/server/plugin/auth_token_test.go @@ -27,9 +27,9 @@ func (a *mockAesgcm) NonceSize() int { return 1 } func (a *mockAesgcm) Overhead() int { return 1 } -func (a *mockAesgcm) Seal(dst, nonce, plaintext, additionalData []byte) []byte { return []byte("mock") } +func (a *mockAesgcm) Seal(_, _, _, _ []byte) []byte { return []byte("mock") } -func (a *mockAesgcm) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) { +func (a *mockAesgcm) Open(_, _, _, _ []byte) ([]byte, error) { return []byte("mock"), nil } diff --git a/server/plugin/hooks.go b/server/plugin/hooks.go index a206a35..7a7238e 100644 --- a/server/plugin/hooks.go +++ b/server/plugin/hooks.go @@ -15,7 +15,7 @@ type FileStruct struct { Expiry time.Time } -func (p *Plugin) MessageHasBeenPosted(c *plugin.Context, post *model.Post) { +func (p *Plugin) MessageHasBeenPosted(_ *plugin.Context, post *model.Post) { // If the message is posted by bot simply return if post.UserId == p.botUserID { return