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

IsZero and structs

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 0.0.5
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      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?

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

              Created:
              Updated:
              Resolved: