Skip to content

allow any type to support IsZero() #25

Closed

Description

@willnorris

The time.Time type has an IsZero func that determines if it is a zero value. There's no reason we couldn't allow other types to do the same. We just need to add our own interface:

type zeroable interface {
    IsZero() bool
}

Activity

  1. willnorris commented on Oct 27, 2020

    @willnorris
    CollaboratorAuthor

    added in 9905ddd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions