IsZero and structs

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 0.0.5
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Thomas Geulen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: