Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-410

IsZero and structs

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 0.0.5
    • None
    • None
    • None

    Description

      It is currently not possible to flag a struct, i.e. time.Time as 'omitempty' because IsZero() return false, due to the missing Zeroer implementation.

      Should IsZero also check if the given value is equals to the default value of the struct instead of return false in case of a non-implemented Zeroer interface?

      Attachments

        Activity

          People

            Unassigned Unassigned
            thomas.geulen Thomas Geulen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: