1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-24 08:02:32 +02:00

Fix after merge

This commit is contained in:
Jake Sanders 2019-12-17 16:27:17 +00:00
parent 34b1c403bb
commit c3607c23e7
2 changed files with 5 additions and 4 deletions

View File

@ -13,10 +13,10 @@ func (k *klog) Write(l log.Record) {
write(l)
}
func (k *klog) Stream(stop chan bool) <-chan log.Record {
c := make(chan log.Record)
func (k *klog) Stream() (<-chan log.Record, chan bool) {
c, s := make(chan log.Record), make(chan bool)
go close(c)
return c
return c, s
}
// New returns a configured Kubernetes logger

View File

@ -41,11 +41,12 @@ func TestKubernetes(t *testing.T) {
assert.Nil(t, k.Read(), "Read should be unimplemented")
stream := k.Stream(make(chan bool))
stream, stop := k.Stream()
records := []log.Record{}
for s := range stream {
records = append(records, s)
}
close(stop)
assert.Equal(t, 0, len(records), "Stream should be unimplemented")
}