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

Generate time.Time from string/date-time #69

Open
cbndr opened this issue Mar 29, 2020 · 1 comment
Open

Generate time.Time from string/date-time #69

cbndr opened this issue Mar 29, 2020 · 1 comment

Comments

@cbndr
Copy link

cbndr commented Mar 29, 2020

Would it be possible to generate a Go time.Time type from schema string/date-time? Example:

    "start_date": {
      "description": "The actual start date",
      "type": "string",
      "format": "date-time"
    }

currently creates

StartDate string `json:"start_date"`

but in our case we would prefer

StartDate time.Time `json:"start_date"`
@michel-laterman
Copy link

@a-h, i've created a pr for elastic's fork that should be good enough for our needs. Would you like to take an early look before I open the upstream pr?

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

No branches or pull requests

2 participants