Skip to content

Commit

Permalink
[MM-180] Fix lint errors in repo (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
raghavaggarwal2308 authored Feb 1, 2024
1 parent 3fb8aab commit 3e3dae9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ issues:
- path: server/configuration.go
linters:
- unused
- path: server/plugin.go
linters:
- goconst
- path: _test\.go
linters:
- bodyclose
Expand Down
6 changes: 3 additions & 3 deletions server/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func (p *Plugin) handleAdd(w http.ResponseWriter, r *http.Request) {
if addRequest.SendTo == "" {
_, err = p.listManager.AddIssue(userID, addRequest.Message, addRequest.Description, addRequest.PostID)
if err != nil {
p.API.LogError("Unable to add issue err=" + err.Error())
p.API.LogError("Unable to add the issue err=" + err.Error())
p.handleErrorWithCode(w, http.StatusInternalServerError, "Unable to add issue", err)
return
}
Expand All @@ -220,7 +220,7 @@ func (p *Plugin) handleAdd(w http.ResponseWriter, r *http.Request) {

receiver, appErr := p.API.GetUserByUsername(addRequest.SendTo)
if appErr != nil {
p.API.LogError("username not valid, err=" + appErr.Error())
p.API.LogError("invalid username, err=" + appErr.Error())
p.handleErrorWithCode(w, http.StatusInternalServerError, "Unable to find user", appErr)
return
}
Expand Down Expand Up @@ -336,7 +336,7 @@ func (p *Plugin) handleList(w http.ResponseWriter, r *http.Request) {

_, err = w.Write(issuesJSON)
if err != nil {
p.API.LogError("Unable to write json response err=" + err.Error())
p.API.LogError("Unable to write json response while listing issues err=" + err.Error())
}
}

Expand Down

0 comments on commit 3e3dae9

Please sign in to comment.