From 7b5fc09fce4a41c2899a7157843b5d3106749b8b Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 30 Dec 2024 19:03:15 +0100 Subject: refactor: improve type hinting of setField --- internal/index/search.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/index/search.go b/internal/index/search.go index c9f1dbd..9063f20 100644 --- a/internal/index/search.go +++ b/internal/index/search.go @@ -85,10 +85,10 @@ func (index *ReadIndex) GetSource( return result, nil } -func setField( - q query.FieldableQuery, +func setField[T query.FieldableQuery]( + q T, field string, -) query.FieldableQuery { +) T { q.SetField(field) return q -- cgit 1.4.1