Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyYe committed Apr 21, 2023
1 parent cc58c26 commit d4d00f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
6 changes: 1 addition & 5 deletions internal/provider/dreamhost/dreamhost_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ func (provider *DNSProvider) updateIP(hostname, currentIP, lastIP string) error
return err
}

if err := provider.updateDNS(lastIP, currentIP, hostname, "add"); err != nil {
return err
}

return nil
return provider.updateDNS(lastIP, currentIP, hostname, "add")
}

// updateDNS can add or remove DNS records.
Expand Down
4 changes: 1 addition & 3 deletions internal/utils/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,8 @@ func GetIPOnline(configuration *settings.Settings) (string, error) {
if onlineIP == "" {
log.Error(fmt.Sprintf("request:%v failed to get online IP", reqURL))
continue
} else {
log.Debugf("get ip success by: %s, online IP: %s", reqURL, onlineIP)
break
}
log.Debugf("get ip success by: %s, online IP: %s", reqURL, onlineIP)
}

if onlineIP == "" {
Expand Down
5 changes: 1 addition & 4 deletions pkg/notification/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ func (n *EmailNotification) Send(domain, currentIP string) error {
n.conf.Notify.Mail.SMTPPassword)

// Send the email config by sendlist .
if err := d.DialAndSend(m); err != nil {
return err
}
return nil
return d.DialAndSend(m)
}

var mailTemplate = `
Expand Down

0 comments on commit d4d00f9

Please sign in to comment.