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

Obscure error caused by a default tag: line 1: cannot unmarshal !!seq into string #39

Open
Southclaws opened this issue Aug 12, 2018 · 0 comments

Comments

@Southclaws
Copy link

This stumped me for quite a while, not sure if it's a bug or just an undocumented quirk but I figured I should open an issue here anyway.

Some of my fields have a default tag, it seems that this particular piece of code was trying to unmarshal the data and failing causing the entire load to fail.

This is the struct that caused most of the issues:

https://github.com/Southclaws/sampctl/blob/master/types/runtime.go#L34

It contains mostly "-" as the default value, but maybe it was the fact that it used *string types instead of string?

I'm still not sure, for now my fix is to simply ignore errors of this type:

https://github.com/Southclaws/sampctl/blob/dev/types/package.go#L142-L144

Which is messy but temporary until I know more about this problem.

Thanks for such a useful library!

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

1 participant