Skip to content

Accidental nanoseconds #39

@ainar-g

Description

@ainar-g

The classic:

c := &Config{
        // …

        // Whoops!  TTL has the type time.Duration.
        // Wanted sixty seconds, got sixty nanoseconds!
        TTL: 60,
}

I'm pretty sure that 95 % of such raw time.Duration assignments are errors, since not a lot of people actually deal with nanosecond precision in Go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions