Skip to content

Commit

Permalink
chore: fix lint warns
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Sep 6, 2018
1 parent 9d97a92 commit 6fc7b8a
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 117 deletions.
12 changes: 6 additions & 6 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (c *Config) SaveNewKnownHost(target string) {
}
}()

fmt.Fprintln(file, target)
_, _ = fmt.Fprintln(file, target)
}

func (c *Config) addKnownHost(target string) {
Expand Down Expand Up @@ -575,11 +575,11 @@ func (c *Config) WriteSSHConfigTo(w io.Writer) error {
`)
header = strings.Replace(header, "%VERSION", version.VERSION, -1)
header = strings.Replace(header, "%BUILD_DATE", time.Now().Format("2006-01-02 15:04:05 -0700 MST"), -1)
fmt.Fprintln(w, header)
_, _ = fmt.Fprintln(w, header)
// FIXME: add version
fmt.Fprintln(w)
_, _ = fmt.Fprintln(w)

fmt.Fprintln(w, "# host-based configuration")
_, _ = fmt.Fprintln(w, "# host-based configuration")
for _, name := range c.sortedNames() {
host := c.Hosts[name]
computedHost, err := computeHost(host, c, name, false)
Expand All @@ -589,10 +589,10 @@ func (c *Config) WriteSSHConfigTo(w io.Writer) error {
if err = computedHost.WriteSSHConfigTo(w); err != nil {
return err
}
fmt.Fprintln(w)
_, _ = fmt.Fprintln(w)
}

fmt.Fprintln(w, "# global configuration")
_, _ = fmt.Fprintln(w, "# global configuration")
c.Defaults.name = "*"
return c.Defaults.WriteSSHConfigTo(w)
}
Expand Down
Loading

0 comments on commit 6fc7b8a

Please sign in to comment.