From bf6c4141c1e387b451b4336e13ebc269b6dd5937 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 15 Mar 2017 16:30:39 -0400 Subject: [PATCH] Fix golint error golint has figured out an optimization that is blocking other pull requests. This fixes the golint issue. Signed-off-by: Daniel J Walsh --- utils/utils.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/utils/utils.go b/utils/utils.go index b5d29a4f..340e1ba9 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -69,10 +69,8 @@ func RunUnderSystemdScope(pid int, slice string, unitName string) error { properties = append(properties, newProp("PIDs", []uint32{uint32(pid)})) properties = append(properties, newProp("Delegate", true)) properties = append(properties, newProp("DefaultDependencies", false)) - if _, err := conn.StartTransientUnit(unitName, "replace", properties, nil); err != nil { - return err - } - return nil + _, err = conn.StartTransientUnit(unitName, "replace", properties, nil) + return err } func newProp(name string, units interface{}) systemdDbus.Property {