nikoksr/notify

View on GitHub

Showing 4 of 6 total issues

Method Service.send has 7 return statements (exceeds 4 allowed).
Open

func (s *Service) send(ctx context.Context, serverURL, subject, content string) error {
    if serverURL == "" {
        return errors.New("server url is empty")
    }

Severity: Major
Found in service/bark/bark.go - About 45 mins to fix

    Function setupLoginService has 6 return statements (exceeds 4 allowed).
    Open

    func setupLoginService(url string, msgService *http.Service) *http.Service {
        // create another new http client for login request call.
        httpService := http.New()
    
        // append login path for the given mattermost server with custom payload builder.
    Severity: Major
    Found in service/mattermost/mattermost.go - About 40 mins to fix

      Function New has 5 return statements (exceeds 4 allowed).
      Open

      func New(cOpts *ClientOptions, mOpts *MessageOptions) (*Service, error) {
          if cOpts == nil {
              return nil, errors.New("client-options cannot be nil")
          }
      
      
      Severity: Major
      Found in service/plivo/plivo.go - About 35 mins to fix

        Method Service.do has 5 return statements (exceeds 4 allowed).
        Open

        func (s *Service) do(req *http.Request) error {
            // Execute all pre-send hooks in order.
            if err := s.doPreSendHooks(req); err != nil {
                return fmt.Errorf("pre-send hooks: %w", err)
            }
        Severity: Major
        Found in service/http/http.go - About 35 mins to fix
          Severity
          Category
          Status
          Source
          Language