Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wiardvanrij committed Mar 6, 2024
1 parent e7009e3 commit 8a2e87e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"bytes"
"context"
"encoding/json"
"fmt"
"errors"
"math"
"net/http"
"time"
Expand Down Expand Up @@ -140,7 +140,7 @@ func (s *SlackClient) PostMessage(request SlackPostMessageRequest, url string, t
}

if !slackResp.Ok {
return fmt.Errorf(slackResp.Error)
return errors.New(slackResp.Error)
}

return nil
Expand Down
3 changes: 1 addition & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"context"
"encoding/json"
"errors"
"fmt"
"net/http"
"strings"

Expand Down Expand Up @@ -134,7 +133,7 @@ func validate(request SlackPostMessageRequest) error {
}

if len(errorMessages) > 0 {
return fmt.Errorf(strings.Join(errorMessages, " and "))
return errors.New(strings.Join(errorMessages, " and "))
}

return nil
Expand Down

0 comments on commit 8a2e87e

Please sign in to comment.