trivial cleanups from golang

the results of a code cleanup performed by the goland IDE.

Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
baude
2019-07-03 14:35:11 -05:00
parent f5593d305f
commit fec1de6ef4
21 changed files with 27 additions and 27 deletions

View File

@ -215,7 +215,7 @@ func EnableLinger() (string, error) {
// If we have a D-BUS connection, attempt to read the LINGER property from it.
if conn != nil {
path := dbus.ObjectPath((fmt.Sprintf("/org/freedesktop/login1/user/_%s", uid)))
path := dbus.ObjectPath(fmt.Sprintf("/org/freedesktop/login1/user/_%s", uid))
ret, err := conn.Object("org.freedesktop.login1", path).GetProperty("org.freedesktop.login1.User.Linger")
if err == nil && ret.Value().(bool) {
lingerEnabled = true
@ -265,7 +265,7 @@ func EnableLinger() (string, error) {
// If we have a D-BUS connection, attempt to read the RUNTIME PATH from it.
if conn != nil {
path := dbus.ObjectPath((fmt.Sprintf("/org/freedesktop/login1/user/_%s", uid)))
path := dbus.ObjectPath(fmt.Sprintf("/org/freedesktop/login1/user/_%s", uid))
ret, err := conn.Object("org.freedesktop.login1", path).GetProperty("org.freedesktop.login1.User.RuntimePath")
if err == nil {
return strings.Trim(ret.String(), "\"\n"), nil