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

I cannot get the default value from client side #380

Closed
zweich1212 opened this issue May 8, 2017 · 1 comment
Closed

I cannot get the default value from client side #380

zweich1212 opened this issue May 8, 2017 · 1 comment

Comments

@zweich1212
Copy link

zweich1212 commented May 8, 2017

My struct is like
type TestMetric struct {
TestA int64 protobuf:"varint,1,opt,name=testa" json:"testa,omitempty"
TestB int64 protobuf:"varint,2,opt,name=testb" json:"testb,omitempty"
TestC int64 protobuf:"varint,3,opt,name=testc" json:"testc,omitempty"
}
When I init each element of the struct with zero value, I cannot get it from HTTP client, while , I can get it, if I set them to -1 or other value.

What could be the root cause?

Many thanks for your answers.

@achew22
Copy link
Collaborator

achew22 commented Dec 14, 2017

There has been a lot of work on the code since this was filed and I think it's likely that this is fixed. If you have more issues please reopen/file a new issue.

@achew22 achew22 closed this as completed Dec 14, 2017
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