fixed error handling and docs

This commit is contained in:
2024-09-09 16:38:58 +01:00
parent dba01de425
commit 9283306006
5 changed files with 52 additions and 17 deletions

View File

@@ -32,9 +32,12 @@ func TestFeed_Topics(t *testing.T) {
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
feed, err := Feed(tc.topic, false)
require.NoError(t, err)
feedback := make(chan int)
go func() {
for i := range Feed(tc.topic, false) {
for i := range feed {
feedback <- i
}
}()
@@ -58,5 +61,4 @@ func TestFeed_Topics(t *testing.T) {
}
})
}
}