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
}
if err = eh.movePreservePerms(tmp, etcHosts); err != nil {
return err
}
return nil
return eh.movePreservePerms(tmp, etcHosts)
}
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 {
if err := exec.Command("wg-quick", "down", wg.iface).Run(); err != nil {
return err
}
return nil
return exec.Command("wg-quick", "down", wg.iface).Run()
}
func (wg *wgState) upInterface() error {
if err := exec.Command("wg-quick", "up", wg.iface).Run(); err != nil {
return err
}
return nil
return exec.Command("wg-quick", "up", wg.iface).Run()
}
func wgKeyPair() (string, string, error) {