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

Couldn't find swag.DateTime(strfmt.DateTime) *strfmt.DateTime #734

Closed
anisimovsergey opened this issue Nov 11, 2016 · 1 comment
Closed

Comments

@anisimovsergey
Copy link

It would be nice to have functions similar to swag.String(v string) *string but for

  • strfmt.DateTime
  • strfmt.Date
  • strfmt.Duration
@GlenDC
Copy link
Member

GlenDC commented Feb 7, 2017

This has been resolved by adding a conv package to go-openapi/strfmt as can be seen in following (merged) PR: go-openapi/strfmt#10

Thus besides importing github.com/go-openapi/strfmt you'll probably also want to import github.com/go-openapi/strfmt/conv.

The conv package provides the functions you are looking for, provided for all types defined in the main strfmt package.

@GlenDC GlenDC closed this as completed Feb 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants