Swap main database to bolt; refactor sp list sorting

This commit is contained in:
mitchell 2019-07-22 20:24:00 -04:00
parent a67be14fcb
commit ed66895fcb
12 changed files with 158 additions and 30 deletions

View file

@ -81,6 +81,8 @@ receive:
keyIDMap[key] = md.ID
}
sort.Strings(keys)
prompt = &survey.Select{
Message: "Primary user key (and tag):",
Options: keys,

View file

@ -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)
}

View file

@ -225,6 +225,7 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/yunify/qingstor-sdk-go v2.2.15+incompatible/go.mod h1:w6wqLDQ5bBTzxGJ55581UrSwLrsTAsdo9N6yX/8d9RY=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=