mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 18:36:30 +02:00
- import path comments are obsoleted by the go.mod file's module statement Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
15 lines
468 B
Go
15 lines
468 B
Go
// Package tripper provides utility functions for working with the
|
|
// http.RoundTripper interface.
|
|
package tripper
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// RoundTripperFunc wraps a function in a RoundTripper interface similar to HandlerFunc
|
|
type RoundTripperFunc func(*http.Request) (*http.Response, error)
|
|
|
|
// RoundTrip calls the underlying tripper function in the RoundTripperFunc
|
|
func (f RoundTripperFunc) RoundTrip(req *http.Request) (*http.Response, error) {
|
|
return f(req)
|
|
}
|