Skip to content

_ prefix hides struct field #156

@andig

Description

@andig

I've just noticed, that I can unmarshal into this:

		URI_    string `mapstructure:"uri"`   // TODO deprecated
		Token_  string `mapstructure:"token"` // TODO deprecated

but not into this:

		_URI    string `mapstructure:"uri"`   // TODO deprecated
		_Token  string `mapstructure:"token"` // TODO deprecated

The latter gives:

'' has invalid keys: token, uri

Not sure if this is intentional?

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