func New(value interface{}) *StateMachine {
return &StateMachine{
states: map[string]*State{},
events: map[string]*Event{},
}
}
有疑问加站长微信联系(非本文作者)

func New(value interface{}) *StateMachine {
return &StateMachine{
states: map[string]*State{},
events: map[string]*Event{},
}
}
有疑问加站长微信联系(非本文作者)
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
`单行代码`
你是说函数里根本没用上这个传递的参数?
是的.源码传进去一个结构体.没有使用.是不是有其它访问方式?
你这是哪里看到的代码?没有使用肯定没啥意义啊
qor.transition 的一段源码. https://github.com/qor/transition/transition.go
https://github.com/qor/transition/blob/master/transition.go
确实没啥用。可能考虑将来有用处吧,没有啥特殊意义!