From beecd2dbe449e551d08668adf0b8ace427d09c49 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 1 Mar 2019 20:00:07 +0530 Subject: Made requested changes Made changes to the doc files and remaining areas which required updation. --- cache/bug_excerpt.go | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'cache/bug_excerpt.go') diff --git a/cache/bug_excerpt.go b/cache/bug_excerpt.go index eae90f5a..86424a0a 100644 --- a/cache/bug_excerpt.go +++ b/cache/bug_excerpt.go @@ -23,16 +23,11 @@ type BugExcerpt struct { CreateUnixTime int64 EditUnixTime int64 - Title string - Status bug.Status - NoOfComments int - Labels []bug.Label - - // If author is identity.Bare, LegacyAuthor is set - // If author is identity.Identity, AuthorId is set and data is deported - // in a IdentityExcerpt - LegacyAuthor LegacyAuthorExcerpt - AuthorId string + Title string + Status bug.Status + Author identity.Interface + LenComments int + Labels []bug.Label CreateMetadata map[string]string } @@ -53,22 +48,10 @@ func NewBugExcerpt(b bug.Interface, snap *bug.Snapshot) *BugExcerpt { Title: snap.Title, Status: snap.Status, Labels: snap.Labels, - NoOfComments: len(snap.Comments), + LenComments: len(snap.Comments), CreateMetadata: b.FirstOp().AllMetadata(), } - switch snap.Author.(type) { - case *identity.Identity: - e.AuthorId = snap.Author.Id() - case *identity.Bare: - e.LegacyAuthor = LegacyAuthorExcerpt{ - Login: snap.Author.Login(), - Name: snap.Author.Name(), - } - default: - panic("unhandled identity type") - } - return e } -- cgit