fix: flownode.Task can't assign.

This commit is contained in:
huangsimin 2019-11-07 11:16:48 +08:00
parent 30e531fe09
commit 147c79cc0c

View File

@ -82,7 +82,7 @@ type Flow struct {
// Add 添加
func (flow *Flow) Add(name string, task func(cxt *FlowContext) int) {
node := &FlowNode{Name: name}
node := &FlowNode{Name: name, Task: task}
if flow.Head == nil {
flow.Head = node