Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jasonliu119 opened this issue Feb 23, 2024 · 2 comments

Comments

@jasonliu119
Copy link

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
Copy link
Author

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

@s8sg
Copy link
Owner

s8sg commented Apr 2, 2024

I think it was mostly to avoid serialization issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants