From 68bbcf0d299ed6b402381fd31348c9c77908831f Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Tue, 15 Jun 2021 04:59:56 +0200 Subject: zippy: do not include ref --- skate/schema.go | 6 +++--- skate/zippy.go | 2 +- skate/zippy_test.go | 24 ++++++++++++------------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/skate/schema.go b/skate/schema.go index 7f707f3..10504fe 100644 --- a/skate/schema.go +++ b/skate/schema.go @@ -345,9 +345,9 @@ type BiblioRef struct { MatchReason string `json:"match_reason,omitempty"` TargetUnstructured string `json:"target_unstructured,omitempty"` TargetCSL string `json:"target_csl,omitempty"` - Extra struct { - Ref Ref `json:"ref"` // keep the raw original ref around (e.g. for unmatched) - } `json:"extra"` + // Extra struct { + // Ref Ref `json:"ref,omitempty"` // keep the raw original ref around (e.g. for unmatched) + // } `json:"extra,omitempty"` } // ReleaseCluster, a list of match candidates. This is typically serialized as a diff --git a/skate/zippy.go b/skate/zippy.go index 69877b7..f763808 100644 --- a/skate/zippy.go +++ b/skate/zippy.go @@ -388,7 +388,7 @@ func matchedRefsExtend(matched []*BiblioRef, refs []*Ref, stats *statsAugment) [ // Reuse fields for debugging, for now. bref.MatchStatus = StatusUnmatched.Short() bref.MatchReason = ReasonUnknown.Short() - bref.Extra.Ref = *r + // bref.Extra.Ref = *r matched = append(matched, &bref) } return matched diff --git a/skate/zippy_test.go b/skate/zippy_test.go index 817626b..d0ebbd4 100644 --- a/skate/zippy_test.go +++ b/skate/zippy_test.go @@ -193,18 +193,18 @@ func TestMatchedRefsExtend(t *testing.T) { MatchStatus: StatusUnmatched.Short(), MatchReason: ReasonUnknown.Short(), SourceYear: "0", - Extra: struct { - Ref Ref `json:"ref"` - }{ - Ref: Ref{ - ReleaseIdent: "0000", - Biblio: Biblio{ - Title: "Title", - }, - Index: 3, - Key: "K3", - }, - }, + // Extra: struct { + // Ref Ref `json:"ref"` + // }{ + // Ref: Ref{ + // ReleaseIdent: "0000", + // Biblio: Biblio{ + // Title: "Title", + // }, + // Index: 3, + // Key: "K3", + // }, + // }, }, }, }, -- cgit v1.2.3