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

cmd/compile: improve error message when field not found in anonymous struct #17631

Closed
rogpeppe opened this issue Oct 27, 2016 · 3 comments
Closed

Comments

@rogpeppe
Copy link
Contributor

go version devel +2113c9a Tue Oct 25 07:51:17 2016 +0000 linux/amd64

I just saw this error message and it took a while for me to parse it:

./database_test.go:554: unknown struct { about string; before map[mongodoc.EntityCount]mongodoc.Count; update map[mongodoc.EntityCount]int; updateTime time.Time; expect map[mongodoc.EntityCount]mongodoc.Count } field 'updates' in struct literal

Perhaps it would be better if the type went at the end of the message so
the entire struct type wasn't in the middle of the sentence.

For example:

./database_test.go:554: unknown field 'updates' in struct literal of type struct { about string; before map[mongodoc.EntityCount]mongodoc.Count; update map[mongodoc.EntityCount]int; updateTime time.Time; expect map[mongodoc.EntityCount]mongodoc.Count }

@josharian
Copy link
Contributor

cc @odeke-em

@odeke-em odeke-em self-assigned this Oct 28, 2016
@gopherbot
Copy link

CL https://golang.org/cl/32240 mentions this issue.

@odeke-em
Copy link
Member

Thanks for the ping @josharian! Done, I've mailed https://go-review.googlesource.com/32240.

@golang golang locked and limited conversation to collaborators Oct 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants