Expose address in keyinfo, add get command

This commit is contained in:
Ethan Frey
2017-02-28 20:07:44 +01:00
parent d5931c9ee3
commit c59e2d7d13
11 changed files with 89 additions and 17 deletions

View File

@ -44,7 +44,7 @@ func (s MemStore) Get(name string) ([]byte, keys.Info, error) {
if !ok {
err = errors.Errorf("Key named '%s' doesn't exist", name)
}
return d.key, d.info, err
return d.key, d.info.Format(), err
}
// List returns the public info of all keys in the MemStore in unsorted order
@ -52,7 +52,7 @@ func (s MemStore) List() (keys.Infos, error) {
res := make([]keys.Info, len(s))
i := 0
for _, d := range s {
res[i] = d.info
res[i] = d.info.Format()
i++
}
return res, nil