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

Passing struct pointers to Post method #98

Open
dearoneesama opened this issue Oct 14, 2021 · 1 comment
Open

Passing struct pointers to Post method #98

dearoneesama opened this issue Oct 14, 2021 · 1 comment

Comments

@dearoneesama
Copy link
Contributor

I noticed that the Post method only supports passing values typed as interface{}, for example, only doing this is valid:

ptr := &struct{}{}
fluent.Post("tag", *ptr)

and passes this check

msg := reflect.ValueOf(message)
msgtype := msg.Type()
if msgtype.Kind() == reflect.Struct {

Passing pointers generates error instead. Can we support passing a struct pointer (use .Elem().Field() to get its fields) and if not, what are possible concerns?

@batara666
Copy link

It will panicking on fluentd sys core

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