未验证 提交 990af48d 编写于 作者: C chenjunbiao 提交者: GitHub

fix(example): repair the wrong data output by flow (#131)

上级 b9c7691a
......@@ -23,7 +23,8 @@ type NoiseData struct {
var printer = func(_ context.Context, i interface{}) (interface{}, error) {
value := i.(NoiseData)
rightNow := time.Now().UnixNano() / int64(time.Millisecond)
return fmt.Sprintf("[%s] %d > value: %f ⚡️=%dms", value.From, value.Time, value.Noise, rightNow-value.Time), nil
fmt.Printf("[%s] %d > value: %f ⚡️=%dms\n", value.From, value.Time, value.Noise, rightNow-value.Time)
return i, nil
}
var callback = func(v []byte) (interface{}, error) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册