You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not all repositories return it's language , the return json may just {language : null}, thus the pointer in struct point to nil.
it need to do many pointer nil checking before use those field.
Is it possible to let the default type initialized?
says string should be "", int should be 0.
Unfortunately, there's not an easy solution to this. #19 certainly does have all the discussion that led to this design, but I also wrote about it here if you're interested.
The best solution will be to implement #45, which is what the proto library does. go generate didn't exist when I originally filed that issue, so it would actually be much easier to implement now.
Closing this for now, as there isn't actually anything to do here.
I am trying to get github user repositories
https://gist.github.com/yisiper/48ea8ddc9c48d97e7a9f
Not all repositories return it's language , the return json may just {language : null}, thus the pointer in struct point to nil.
it need to do many pointer nil checking before use those field.
Is it possible to let the default type initialized?
says string should be "", int should be 0.
ref: #19 (comment)
The text was updated successfully, but these errors were encountered: