Skip to content

Commit

Permalink
Fix vet
Browse files Browse the repository at this point in the history
  • Loading branch information
owenthereal committed Sep 3, 2023
1 parent 1d3bc87 commit 1e61e8e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/candy/cmd/setup_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package cmd
import (
"errors"
"fmt"
"io/ioutil"
"net"
"os"
"path/filepath"
Expand Down Expand Up @@ -75,7 +74,7 @@ func runSetupRunE(c *cobra.Command, args []string) error {
file := filepath.Join(resolverDir, "candy-"+domain)
content := fmt.Sprintf(resolverTmpl, domain, host, port)

b, err := ioutil.ReadFile(file)
b, err := os.ReadFile(file)
if err == nil {
if string(b) == content {
logger.Info("resolver configuration file unchanged", zap.String("file", file))
Expand All @@ -84,7 +83,7 @@ func runSetupRunE(c *cobra.Command, args []string) error {
}

logger.Info("writing resolver configuration file", zap.String("file", file))
if err := ioutil.WriteFile(file, []byte(content), 0o644); err != nil {
if err := os.WriteFile(file, []byte(content), 0o644); err != nil {
return err
}
}
Expand Down

0 comments on commit 1e61e8e

Please sign in to comment.