Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time.Duration should implement encoding.TextMarshaler #24174

Closed
nicksnyder opened this issue Feb 28, 2018 · 2 comments
Closed

time.Duration should implement encoding.TextMarshaler #24174

nicksnyder opened this issue Feb 28, 2018 · 2 comments

Comments

@nicksnyder
Copy link

nicksnyder commented Feb 28, 2018

time.Time implements all of the marshaler and unmarshaler interfaces, but time.Duration implements none of these.

I came across a case today where it would have been very convenient if time.Duration had already implemented encoding.TextMarshaler and encoding.TextUnmarshaler.

Would you accept a contribution that added implementations for these interfaces?

@ghost
Copy link

ghost commented Feb 28, 2018

Would you accept a contribution that added implementations for these interfaces?

Not until Go2.

Duplicate of #10275.

@dsnet
Copy link
Member

dsnet commented Feb 28, 2018

Closing as duplicate.

@dsnet dsnet closed this as completed Feb 28, 2018
@golang golang locked and limited conversation to collaborators Feb 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants