Re:Somehow, sometimes, this happens
by dpc_pw on Monday January 29, 2018 @02:09PM
(#16259849)
Same here. Yeah, it points to rather poor handling of error condition in this case, and it is an example of deeper problem of terrible error handling in Go, but overall - I don't see what the point is. There's plenty of worse code all over the place, in many programs, written in many languages, and this is hardly a notable offender.
Re:Somehow, sometimes, this happens
by dlahoda on Monday January 29, 2018 @02:05PM
(#16259816)
to be sure in software one should know all possible inputs and outputs and why these happen. mentioned comment argues that this is not so for security service software. which is actually fun.
Re:Somehow, sometimes, this happens
by FLUX-YOU on Monday January 29, 2018 @02:15PM
(#16259899)
renewAuth() calls RenewTokenAsSelf() which calls ParseSecret() which calls DecodeJSONFromReader()
DecodeJSONFromReader has a couple of comments stating that the interface is a pointer along with "While decoding JSON values...", so is the reader an asynchronous object and renewal and renewal.Auth are modified after the error case is checked?
One would hope that such a codebase is well understood and implemented.
DecodeJSONFromReader has a couple of comments stating that the interface is a pointer along with "While decoding JSON values...", so is the reader an asynchronous object and renewal and renewal.Auth are modified after the error case is checked?
(I know nothing about Go, basically)