Open
Description
For example, take a look at docker-compose file. build
can be a string or a struct, and that's perfectly valid. To unmarshal such a situtation, I thought I could try to unmarshal a string before, and then a struct if the former errored out. Unfortunately I found out that TypeError
exists, but it's internal:
https://github.com/goccy/go-yaml/blob/v1.9.8/internal/errors/error.go#L225
Could you expose it, or suggest me an alternative way to unmarshal a value which may be of two different types?