pomerium/internal/tripper/roundtripper.go
Bobby DeSimone ba14ea246d
*: remove import path comments (#545)
- import path comments are obsoleted by the go.mod file's module statement

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
2020-03-16 10:13:47 -07:00

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)
}