Skip to content

Passing struct pointers to Post method #98

Open
@dearoneesama

Description

@dearoneesama

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions