configor
configor copied to clipboard
Obscure error caused by a `default` tag: line 1: cannot unmarshal !!seq into string
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!