Skip to content

Commit

Permalink
fix(linter): update to make the linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
aerialls committed Dec 19, 2020
1 parent 061ed3a commit 726def5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 4 additions & 1 deletion cmd/scaleway-ddns/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ func init() {
rootCmd.Flags().BoolVarP(&verbose, "verbose", "v", false, "enable verbose logging")
rootCmd.Flags().BoolVarP(&dryRun, "dry-run", "d", false, "don't update DNS records")

rootCmd.MarkFlagRequired("config")
err := rootCmd.MarkFlagRequired("config")
if err != nil {
logger.Fatal(err)
}
}

func initConfig() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/scaleway-ddns/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var versionCmd = &cobra.Command{
Use: "version",
Short: "Prints the version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(fmt.Sprintf("scaleway-ddns %s (commit %s, built at %s)", version, commit, date))
fmt.Printf("scaleway-ddns %s (commit %s, built at %s)\n", version, commit, date)
},
}

Expand Down
7 changes: 2 additions & 5 deletions ddns/ddns.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ func (d *DynamicDNSUpdater) Start() {
d.doStart()

ticker := time.NewTicker(time.Duration(cfg.Interval) * time.Second)
for {
select {
case <-ticker.C:
d.doStart()
}
for range ticker.C {
d.doStart()
}
}

Expand Down

0 comments on commit 726def5

Please sign in to comment.