Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix linter errors
Browse files Browse the repository at this point in the history
Hsn723 committed Nov 12, 2023
1 parent 9324c86 commit fada2f1
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -16,3 +16,8 @@ run:
build-tags:
- test
- e2e
linters-settings:
revive:
rules:
- name: dot-imports
disabled: true
5 changes: 2 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@ package cmd

import (
"bytes"
"io/ioutil"
"os"
"path/filepath"
"strings"
@@ -152,7 +151,7 @@ func checkIssuances(dc config.DomainConfig, c api.CertspotterClient, mailSender
}

func atomicWritePosition(pc config.PositionConfig) error {
tmpFile, err := ioutil.TempFile(filepath.Dir(pc.Filename), "position.*.toml")
tmpFile, err := os.CreateTemp(filepath.Dir(pc.Filename), "position.*.toml")
if err != nil {
return err
}
@@ -184,7 +183,7 @@ func getMailSenderForDomain(conf *config.Config, dc config.DomainConfig, default
return domainMailer
}

func runRoot(cmd *cobra.Command, args []string) error {
func runRoot(_ *cobra.Command, _ []string) error {
_ = log.Info("ct-monitor", map[string]interface{}{
"version": version,
"commit": commit,
2 changes: 1 addition & 1 deletion filter/common.go
Original file line number Diff line number Diff line change
@@ -54,6 +54,6 @@ func (p *IssuanceFilterPlugin) Server(*plugin.MuxBroker) (interface{}, error) {
return &IssuanceFilterRPCServer{Impl: p.Impl}, nil
}

func (*IssuanceFilterPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error) {
func (*IssuanceFilterPlugin) Client(_ *plugin.MuxBroker, c *rpc.Client) (interface{}, error) {
return &IssuanceFilterRPCClient{client: c}, nil
}
4 changes: 3 additions & 1 deletion mailer/sendgrid.go
Original file line number Diff line number Diff line change
@@ -29,7 +29,9 @@ func (s *SendgridMailer) init() {
}

// Init implements the Mailer's Init interface.
func (s SendgridMailer) Init(from, to string) error {
func (s *SendgridMailer) Init(from, to string) error {
s.From = from
s.To = to
if s.From == "" {
return ErrMissingSender
}

0 comments on commit fada2f1

Please sign in to comment.