Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
5b3328f2b9
|
|||
|
16e972c148
|
2
funcs.go
2
funcs.go
@@ -118,7 +118,7 @@ func pathsFromPath(bus dbus.BusObject, path string) (paths []dbus.ObjectPath, er
|
||||
|
||||
/*
|
||||
NameFromPath returns an actual name (as it appears in Dbus) from a dbus.ObjectPath.
|
||||
Note that you can get any object's dbus.ObjectPath via <object.Dbus.Path().
|
||||
Note that you can get any object's dbus.ObjectPath via <object>.Dbus.Path().
|
||||
path is validated to ensure it is not an empty string.
|
||||
*/
|
||||
func NameFromPath(path dbus.ObjectPath) (name string, err error) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package gosecret
|
||||
|
||||
import (
|
||||
`strconv`
|
||||
`strings`
|
||||
`time`
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
`github.com/godbus/dbus/v5`
|
||||
"github.com/godbus/dbus/v5"
|
||||
)
|
||||
|
||||
// NewItem returns a pointer to an Item based on Collection and a Dbus path.
|
||||
@@ -158,6 +158,7 @@ func (i *Item) Label() (label string, err error) {
|
||||
}
|
||||
|
||||
label = variant.Value().(string)
|
||||
i.LabelName = label
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user