Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
orvice committed Oct 26, 2024
1 parent 426dd59 commit 8f5716c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions cmd/ddns/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,9 @@ import (
"log/slog"
"os"

"github.com/orvice/ddns/dns"
"github.com/orvice/ddns/internal/ip"
"github.com/orvice/ddns/internal/wire"
)

var (
dnsProvider dns.LibDNS
ipGetter ip.Getter
DNSMode string
)

var (
IPNotifyFormat = "[%s] ip changed, old IP: %s new IP: %s"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (a *App) updateIP(ctx context.Context) error {
a.logger.Error("Set records error", "error", err)
return err
}
a.notifier.Send(ctx, fmt.Sprintf(IPNotifyFormat, a.config.Domain, oldIP, ip))
_ = a.notifier.Send(ctx, fmt.Sprintf(IPNotifyFormat, a.config.Domain, oldIP, ip))
} else {
_, err = a.dnsProvider.AppendRecords(ctx, zone, []libdns.Record{
{
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Config struct {
}

func New() (*Config, error) {
var path string = "."
path := "."
viper.AddConfigPath(path)
viper.SetConfigName("app")

Expand Down

0 comments on commit 8f5716c

Please sign in to comment.