wire
wire copied to clipboard
"unknown pattern" is an unhelpful error message
trafficstars
I was trying to use some newer wire features with an older version of the wire command.
I used wire.Struct, and the error I got was:
/home/rog/src/tstwire/wire.go:8:27: unknown pattern
Although, it was correct to report an error, the specific message could be improved by saying what kind of thing is expected in this context, and perhaps by using some term that's defined in the documentation, not "pattern", which is not.
@shantuo can you take a look?
I agree, there are three places reporting the same "unknown pattern" error, I'll try to distinguish them into better proper messages.