lib/model, lib/protocol: Add Folder.Description() for logging (ref #3741)

This commit is contained in:
Jakob Borg
2016-11-22 08:36:14 +01:00
parent 8fbcceb742
commit cc9a9fb390
2 changed files with 11 additions and 6 deletions

View File

@@ -134,3 +134,8 @@ func (i *IndexID) Unmarshal(bs []byte) error {
func NewIndexID() IndexID {
return IndexID(rand.Int64())
}
func (f Folder) Description() string {
// used by logging stuff
return fmt.Sprintf("%q (%s)", f.Label, f.ID)
}