From a6f4afe4910cad8688db3e0e9b9ac92ad22d54e1 Mon Sep 17 00:00:00 2001 From: Goran Sterjov Date: Sat, 1 Oct 2016 19:47:33 +1000 Subject: [PATCH] Changed constants to use correct Go style --- collection.go | 2 +- item.go | 2 +- prompt.go | 4 ++-- service.go | 6 +++--- session.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/collection.go b/collection.go index 5bd2b1d..a835ae5 100644 --- a/collection.go +++ b/collection.go @@ -12,7 +12,7 @@ type Collection struct { func NewCollection(conn *dbus.Conn, path dbus.ObjectPath) *Collection { return &Collection{ conn: conn, - dbus: conn.Object(DBUS_SERVICE_NAME, path), + dbus: conn.Object(DBusServiceName, path), } } diff --git a/item.go b/item.go index 6e0da6b..f0e6ad3 100644 --- a/item.go +++ b/item.go @@ -12,7 +12,7 @@ type Item struct { func NewItem(conn *dbus.Conn, path dbus.ObjectPath) *Item { return &Item{ conn: conn, - dbus: conn.Object(DBUS_SERVICE_NAME, path), + dbus: conn.Object(DBusServiceName, path), } } diff --git a/prompt.go b/prompt.go index 3c4b249..2c7d3f8 100644 --- a/prompt.go +++ b/prompt.go @@ -15,7 +15,7 @@ type Prompt struct { func NewPrompt(conn *dbus.Conn, path dbus.ObjectPath) *Prompt { return &Prompt{ conn: conn, - dbus: conn.Object(DBUS_SERVICE_NAME, path), + dbus: conn.Object(DBusServiceName, path), } } @@ -26,7 +26,7 @@ func (prompt Prompt) Path() dbus.ObjectPath { func isPrompt(path dbus.ObjectPath) bool { - promptPath := DBUS_PATH + "/prompt/" + promptPath := DBusPath + "/prompt/" return strings.HasPrefix(string(path), promptPath) } diff --git a/service.go b/service.go index 2ecb627..bfe0f27 100644 --- a/service.go +++ b/service.go @@ -4,8 +4,8 @@ import "github.com/godbus/dbus" const ( - DBUS_SERVICE_NAME = "org.freedesktop.secrets" - DBUS_PATH = "/org/freedesktop/secrets" + DBusServiceName = "org.freedesktop.secrets" + DBusPath = "/org/freedesktop/secrets" ) type DBusObject interface { @@ -27,7 +27,7 @@ func NewService() (*Service, error) { return &Service{ conn: conn, - dbus: conn.Object(DBUS_SERVICE_NAME, DBUS_PATH), + dbus: conn.Object(DBusServiceName, DBusPath), }, nil } diff --git a/session.go b/session.go index 75bd351..8cef0ce 100644 --- a/session.go +++ b/session.go @@ -12,7 +12,7 @@ type Session struct { func NewSession(conn *dbus.Conn, path dbus.ObjectPath) *Session { return &Session{ conn: conn, - dbus: conn.Object(DBUS_SERVICE_NAME, path), + dbus: conn.Object(DBusServiceName, path), } }