From 343cdecabd46e2b505f3f92c8281753df1ee0fee Mon Sep 17 00:00:00 2001 From: tjpcc Date: Sat, 26 Aug 2023 09:22:03 -0600 Subject: GmisubToAtom: output result to any io.Writer rather than return a string --- gemini/gemtext/sub_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gemini/gemtext/sub_test.go') diff --git a/gemini/gemtext/sub_test.go b/gemini/gemtext/sub_test.go index 26f98ed..f080705 100644 --- a/gemini/gemtext/sub_test.go +++ b/gemini/gemtext/sub_test.go @@ -51,8 +51,11 @@ func TestGemsubToAtom(t *testing.T) { if err != nil { t.Fatal(err) } - xml := GmisubToAtom(doc, *loc) - if xml != test.output { + out := &bytes.Buffer{} + if err := GmisubToAtom(doc, *loc, out); err != nil { + t.Fatal(err) + } + if out.String() != test.output { t.Fatal("mismatched output") } }) -- cgit v1.2.3