Changed constants to use correct Go style

This commit is contained in:
Goran Sterjov 2016-10-01 19:47:33 +10:00
parent 8c0993ba70
commit a6f4afe491
5 changed files with 8 additions and 8 deletions

View File

@ -12,7 +12,7 @@ type Collection struct {
func NewCollection(conn *dbus.Conn, path dbus.ObjectPath) *Collection { func NewCollection(conn *dbus.Conn, path dbus.ObjectPath) *Collection {
return &Collection{ return &Collection{
conn: conn, conn: conn,
dbus: conn.Object(DBUS_SERVICE_NAME, path), dbus: conn.Object(DBusServiceName, path),
} }
} }



View File

@ -12,7 +12,7 @@ type Item struct {
func NewItem(conn *dbus.Conn, path dbus.ObjectPath) *Item { func NewItem(conn *dbus.Conn, path dbus.ObjectPath) *Item {
return &Item{ return &Item{
conn: conn, conn: conn,
dbus: conn.Object(DBUS_SERVICE_NAME, path), dbus: conn.Object(DBusServiceName, path),
} }
} }



View File

@ -15,7 +15,7 @@ type Prompt struct {
func NewPrompt(conn *dbus.Conn, path dbus.ObjectPath) *Prompt { func NewPrompt(conn *dbus.Conn, path dbus.ObjectPath) *Prompt {
return &Prompt{ return &Prompt{
conn: conn, 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 { func isPrompt(path dbus.ObjectPath) bool {
promptPath := DBUS_PATH + "/prompt/" promptPath := DBusPath + "/prompt/"
return strings.HasPrefix(string(path), promptPath) return strings.HasPrefix(string(path), promptPath)
} }



View File

@ -4,8 +4,8 @@ import "github.com/godbus/dbus"




const ( const (
DBUS_SERVICE_NAME = "org.freedesktop.secrets" DBusServiceName = "org.freedesktop.secrets"
DBUS_PATH = "/org/freedesktop/secrets" DBusPath = "/org/freedesktop/secrets"
) )


type DBusObject interface { type DBusObject interface {
@ -27,7 +27,7 @@ func NewService() (*Service, error) {


return &Service{ return &Service{
conn: conn, conn: conn,
dbus: conn.Object(DBUS_SERVICE_NAME, DBUS_PATH), dbus: conn.Object(DBusServiceName, DBusPath),
}, nil }, nil
} }



View File

@ -12,7 +12,7 @@ type Session struct {
func NewSession(conn *dbus.Conn, path dbus.ObjectPath) *Session { func NewSession(conn *dbus.Conn, path dbus.ObjectPath) *Session {
return &Session{ return &Session{
conn: conn, conn: conn,
dbus: conn.Object(DBUS_SERVICE_NAME, path), dbus: conn.Object(DBusServiceName, path),
} }
} }