Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Fix timetype #38

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Fix timetype #38

wants to merge 10 commits into from

Conversation

adamhassel
Copy link
Contributor

@adamhassel adamhassel commented May 16, 2022

This introduces an option, UseBinary, which will use the encoding.MarshalBinary interface of any type implementing it. This fixes hashes of time value for one thing, and expands on the time.Time specific changes from #21 .

Since this could be a breaking change, it is hidden behind a new "UseBinary" option. For types that implement both fmt.Stringer and encoding.MarshalBinary (like time.Time), and when both UseBinary and UseStringer are set, the Binary option is preferred, unless the string tag is specifically set on the struct member.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants