wire icon indicating copy to clipboard operation
wire copied to clipboard

"unknown pattern" is an unhelpful error message

Open rogpeppe opened this issue 6 years ago • 2 comments
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.

rogpeppe avatar May 08 '19 10:05 rogpeppe

@shantuo can you take a look?

vangent avatar May 08 '19 18:05 vangent

I agree, there are three places reporting the same "unknown pattern" error, I'll try to distinguish them into better proper messages.

shantuo avatar May 17 '19 22:05 shantuo