s8sg / goflow

A Golang based high performance, scalable and distributed workflow framework
MIT License
1.06k stars 129 forks source link

Why do we choose []byte as the type of workload func's param/output, not interface{} #89

Open jasonliu119 opened 3 months ago

jasonliu119 commented 3 months ago

IIUC, the workload function is like:

func doSomething(data []byte, option map[string][]string) ([]byte, error) 

Why do we choose []byte as the type of its param/output, not interface{} or Golang any?

jasonliu119 commented 3 months ago

Also, maybe option can be a param of type map[string]interface{}

s8sg commented 2 months ago

I think it was mostly to avoid serialization issue.