mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-23 18:55:27 -04:00
* Update analytics-go dependency * Migrate from segment library v2 to v3 * Reinclude gorilla/handlers module * Fix missing module * Remove reference to outdated analytics module
16 lines
355 B
Go
16 lines
355 B
Go
// +build !go1.6
|
|
|
|
package analytics
|
|
|
|
import "net/http"
|
|
|
|
// http clients on versions of go before 1.6 only support timeout if the
|
|
// transport implements the `CancelRequest` method.
|
|
func supportsTimeout(transport http.RoundTripper) bool {
|
|
_, ok := transport.(requestCanceler)
|
|
return ok
|
|
}
|
|
|
|
type requestCanceler interface {
|
|
CancelRequest(*http.Request)
|
|
}
|