mirror of
https://github.com/xlionjuan/searxng-mcp-go.git
synced 2026-11-17 04:17:51 +00:00
12 lines
414 B
Go
12 lines
414 B
Go
// Package testhelper provides shared test utilities for searxng-mcp-go tests.
|
|
package testhelper
|
|
|
|
import "net/http"
|
|
|
|
// RoundTripperFunc adapts a function to the http.RoundTripper interface.
|
|
type RoundTripperFunc func(*http.Request) (*http.Response, error)
|
|
|
|
// RoundTrip implements the http.RoundTripper interface.
|
|
func (f RoundTripperFunc) RoundTrip(req *http.Request) (*http.Response, error) {
|
|
return f(req)
|
|
}
|