@@ -12,9 +12,9 @@ type EventMatch interface {
1212 eventMatch ()
1313}
1414
15- // EventFileMatch is a subset of zoekt.FileMatch for our Event API.
16- type EventFileMatch struct {
17- // Type is always FileMatchType . Included here for marshalling.
15+ // EventContentMatch is a subset of zoekt.FileMatch for our Event API.
16+ type EventContentMatch struct {
17+ // Type is always ContentMatchType . Included here for marshalling.
1818 Type MatchType `json:"type"`
1919
2020 Path string `json:"name"`
@@ -25,7 +25,7 @@ type EventFileMatch struct {
2525 LineMatches []EventLineMatch `json:"lineMatches"`
2626}
2727
28- func (e * EventFileMatch ) eventMatch () {}
28+ func (e * EventContentMatch ) eventMatch () {}
2929
3030// EventPathMatch is a subset of zoekt.FileMatch for our Event API.
3131type EventPathMatch struct {
@@ -132,7 +132,7 @@ type EventError struct {
132132type MatchType int
133133
134134const (
135- FileMatchType MatchType = iota
135+ ContentMatchType MatchType = iota
136136 RepoMatchType
137137 SymbolMatchType
138138 CommitMatchType
@@ -141,8 +141,8 @@ const (
141141
142142func (t MatchType ) MarshalJSON () ([]byte , error ) {
143143 switch t {
144- case FileMatchType :
145- return []byte (`"file "` ), nil
144+ case ContentMatchType :
145+ return []byte (`"content "` ), nil
146146 case RepoMatchType :
147147 return []byte (`"repo"` ), nil
148148 case SymbolMatchType :
@@ -158,8 +158,8 @@ func (t MatchType) MarshalJSON() ([]byte, error) {
158158}
159159
160160func (t * MatchType ) UnmarshalJSON (b []byte ) error {
161- if bytes .Equal (b , []byte (`"file "` )) {
162- * t = FileMatchType
161+ if bytes .Equal (b , []byte (`"content "` )) {
162+ * t = ContentMatchType
163163 } else if bytes .Equal (b , []byte (`"repo"` )) {
164164 * t = RepoMatchType
165165 } else if bytes .Equal (b , []byte (`"symbol"` )) {
0 commit comments