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

Question: Reg. Parameter type of OCFWriter Append function #231

Open
kishaningithub opened this issue Jun 21, 2021 · 1 comment
Open

Question: Reg. Parameter type of OCFWriter Append function #231

kishaningithub opened this issue Jun 21, 2021 · 1 comment

Comments

@kishaningithub
Copy link
Contributor

kishaningithub commented Jun 21, 2021

Context

I see the OCF Writer append function has the signature

func (ocfw *OCFWriter) Append(data interface{}) error

Inside this we are having a reflection based code to ensure this is of a slice type

goavro/array.go

Line 213 in 9f4e906

return nil, fmt.Errorf("cannot create []interface{}: expected slice; received: %T", datum)

Curious Question

Why not change the parameter type to []interface{} ?

@xmcqueen
Copy link
Contributor

I am not aware of a compelling reason, but it does seem to be working. Have you discovered a bug that needs some attention?

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