aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/query
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2025-07-23 17:27:23 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2025-07-23 17:27:23 -0400
commit3b84e41e8fec9ecf5c9f4885c8908cf94b8999f5 (patch)
tree98a09e3ec84ab54ca5533034bdb891f8366ddfc0 /pkg/query
parent325b23a109527a8ff385889e47b5ea8a102e24db (diff)
Implement basic server over unix datagram
Diffstat (limited to 'pkg/query')
-rw-r--r--pkg/query/outputs.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/query/outputs.go b/pkg/query/outputs.go
index 50a6c4d..1fb7214 100644
--- a/pkg/query/outputs.go
+++ b/pkg/query/outputs.go
@@ -54,20 +54,20 @@ var _ Outputer = &CustomOutput{}
// and a nil error
func (o DefaultOutput) OutputOne(doc *index.Document) (string, error) {
b := strings.Builder{}
- o.writeDoc(&b, doc)
+ o.WriteDoc(&b, doc)
return b.String(), nil
}
func (o DefaultOutput) OutputOneTo(w io.Writer, doc *index.Document) (int, error) {
- return o.writeDoc(w, doc)
+ return o.WriteDoc(w, doc)
}
func (o DefaultOutput) Output(docs []*index.Document) (string, error) {
b := strings.Builder{}
for i, doc := range docs {
- o.writeDoc(&b, doc)
+ o.WriteDoc(&b, doc)
if i != len(docs)-1 {
b.WriteRune('\n')
}
@@ -79,7 +79,7 @@ func (o DefaultOutput) Output(docs []*index.Document) (string, error) {
func (o DefaultOutput) OutputTo(w io.Writer, docs []*index.Document) (int, error) {
n := 0
for _, doc := range docs {
- nn, err := o.writeDoc(w, doc)
+ nn, err := o.WriteDoc(w, doc)
if err != nil {
return n, err
}
@@ -90,7 +90,7 @@ func (o DefaultOutput) OutputTo(w io.Writer, docs []*index.Document) (int, error
return n, nil
}
-func (o DefaultOutput) writeDoc(w io.Writer, doc *index.Document) (int, error) {
+func (o DefaultOutput) WriteDoc(w io.Writer, doc *index.Document) (int, error) {
var n int
s := [][]byte{
[]byte(doc.Path),