-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.10.0
-
Fix Version/s: 0.11.0
-
Component/s: Go - Library
-
Labels:None
The current (as of 72ca60d) pattern for TTransport factories in Golang is
type TTransportFactory interface {
GetTransport(trans TTransport) TTransport
}
This causes issues, because some TTransportFactory implementations can return and error. Consider the THttpClientTransportFactory, which as of of 72ca60d, includes the following snippet:
s, _ := NewTHttpClientWithOptions(p.url, p.options)
return s
The call to NewTHttpClientWithOptions(...) call can throw errors. The resultant behavior is that nil is returned in place of a valid TTransport, with a nil error.
The TTransportFactory interface (and associated use patterns) should be extended to include errors.
- is related to
-
THRIFT-4219 Golang HTTP clients created with Nil buffer
-
- Closed
-
- links to