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

codecgen: handle struct fields of type *time.Time correctly #240

Closed
ugorji opened this issue Apr 7, 2018 · 0 comments
Closed

codecgen: handle struct fields of type *time.Time correctly #240

ugorji opened this issue Apr 7, 2018 · 0 comments

Comments

@ugorji
Copy link
Owner

ugorji commented Apr 7, 2018

If a type has a variable of type *time.Time, the generated code does not compile.

We get errors like those seen in gyuho/etcd@1743d96#commitcomment-28455954

./keys.generated.go:1939:23: cannot use x.Expiration (type *time.Time) as type time.Time in argument to r.encDriver.EncodeTime
./keys.generated.go:1959:23: cannot use x.Expiration (type *time.Time) as type time.Time in argument to r.encDriver.EncodeTime

These are captured in

@ugorji ugorji changed the title codecgen: handle variables of type *time.Time correctly codecgen: handle struct fields of type *time.Time correctly Apr 7, 2018
@ugorji ugorji closed this as completed in b4c50a2 Apr 7, 2018
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

1 participant