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 { | 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), | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								item.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								item.go
									
									
									
									
									
								
							| @ -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), | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -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) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -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 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -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), | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Goran Sterjov
						Goran Sterjov