mirror of
https://github.com/mitchell/selfpass.git
synced 2025-12-14 13:27:21 +00:00
Swap main database to bolt; refactor sp list sorting
This commit is contained in:
parent
a67be14fcb
commit
ed66895fcb
12 changed files with 158 additions and 30 deletions
|
|
@ -81,6 +81,8 @@ receive:
|
|||
keyIDMap[key] = md.ID
|
||||
}
|
||||
|
||||
sort.Strings(keys)
|
||||
|
||||
prompt = &survey.Select{
|
||||
Message: "Primary user key (and tag):",
|
||||
Options: keys,
|
||||
|
|
|
|||
|
|
@ -65,6 +65,10 @@ includes almost all the information but the most sensitive.`,
|
|||
var source string
|
||||
check(survey.AskOne(prompt, &source, nil))
|
||||
|
||||
sort.Slice(mds[source], func(i, j int) bool {
|
||||
return mds[source][i].Primary < mds[source][j].Primary
|
||||
})
|
||||
|
||||
for _, md := range mds[source] {
|
||||
fmt.Println(md)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue