fix some linting

This commit is contained in:
Leo Antunes 2019-03-26 23:41:17 +01:00
parent 823b134c80
commit 29ab726117
2 changed files with 3 additions and 13 deletions

View File

@ -66,11 +66,7 @@ func (eh *EtcHosts) WriteEntries(ipsToNames map[string][]string) error {
return err return err
} }
if err = eh.movePreservePerms(tmp, etcHosts); err != nil { return eh.movePreservePerms(tmp, etcHosts)
return err
}
return nil
} }
func (eh *EtcHosts) writeEntries(orig io.Reader, dest io.Writer, ipsToNames map[string][]string) error { func (eh *EtcHosts) writeEntries(orig io.Reader, dest io.Writer, ipsToNames map[string][]string) error {

View File

@ -84,17 +84,11 @@ func (wg *wgState) writeConf(nodes []node) error {
} }
func (wg *wgState) downInterface() error { func (wg *wgState) downInterface() error {
if err := exec.Command("wg-quick", "down", wg.iface).Run(); err != nil { return exec.Command("wg-quick", "down", wg.iface).Run()
return err
}
return nil
} }
func (wg *wgState) upInterface() error { func (wg *wgState) upInterface() error {
if err := exec.Command("wg-quick", "up", wg.iface).Run(); err != nil { return exec.Command("wg-quick", "up", wg.iface).Run()
return err
}
return nil
} }
func wgKeyPair() (string, string, error) { func wgKeyPair() (string, string, error) {