-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
Maps with time.Time keys #22977
Comments
|
Maps don't call any functions or methods, they use equality as defined in the spec. What is your point here? |
@pjebs |
filed a related issue: #22978 |
@pjebs I have a linter for this issue if you're interested: https://github.com/m3db/build-tools/blob/master/linters/badtime/README.md |
If I have a map with a
time.Time
type as a key, or alternatively a struct with atime.Time
type as a field, with the struct used as a key, it appears as if the key comparisons use==
instead of theEqual
method as recommended by: https://golang.org/pkg/time/#Time.EqualThe text was updated successfully, but these errors were encountered: