Changed constants to use correct Go style
This commit is contained in:
parent
8c0993ba70
commit
a6f4afe491
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
2
item.go
2
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),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user