8000 staticcheck: Report incorrect equality checks of time.Time values. · Issue #47 · dominikh/go-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
staticcheck: Report incorrect equality checks of time.Time values. #47
Open
@dmitshur

Description

@dmitshur

Package time documents that:

Do not use == with Time values.

(Source: https://godoc.org/time#Time.Equal.)

This probably extends to != for inequality checks too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    aggressiveA set of checks that is more prone to false positives but is helpful during code reviewnew-check

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0