-
Type:
Bug
-
Status: Closed
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: 0.9.1
-
Fix Version/s: 0.9.1
-
Component/s: Go - Library
-
Labels:None
-
Patch Info:Patch Available
The error handling at LoadX509KeyPair() is still incorrect, it may now throw a Panic instead of reporting the error.
Main reason is a slight scoping issue. If I read http://golang.org/doc/effective_go.html#redeclaration correctly, then
var err error if foo, err := loadFoo(); err == nil { doSomething() } if err != nil { return err }
is not the same as
var err error foo, err := loadFoo() if err == nil { doSomething() } if err != nil { return err }
because in the latter case a reassignment happens, while in the former case another, second err variable is declared. Therefore, in the first case the error check after the if may incorrectly report successful execution.
- relates to
-
THRIFT-2109 Secure connections should be supported in Go
-
- Closed
-