Skip to content

Commit a72bbfe

Browse files
committed
feat: pass in options to transport
1 parent 1728d06 commit a72bbfe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

http_dumper.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ type HTTPDebugTransport struct {
1818
}
1919

2020
// NewHTTPDebugTransport creates a HTTPDebugTransport with debug flag cached from env.
21-
func NewHTTPDebugTransport(inner http.RoundTripper) *HTTPDebugTransport {
21+
func NewHTTPDebugTransport(inner http.RoundTripper, opts ...Option) *HTTPDebugTransport {
22+
combinedOpts := append([]Option{WithSkipStackFrames(4)}, opts...)
2223
return &HTTPDebugTransport{
2324
Transport: inner,
2425
debugEnabled: os.Getenv("HTTP_DEBUG") != "",
25-
dumper: NewDumper(WithSkipStackFrames(4)),
26+
dumper: NewDumper(combinedOpts...),
2627
}
2728
}
2829

0 commit comments

Comments
 (0)