Help us shape the future of Go! Take the 2026 Go Developer Survey

network

package
v1.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggingRoundTripper

type LoggingRoundTripper struct {
	Base http.RoundTripper
	Log  *slog.Logger
}

LoggingRoundTripper is an http.RoundTripper that logs requests and responses

func NewLoggingRoundTripper

func NewLoggingRoundTripper(logger *slog.Logger, base http.RoundTripper) *LoggingRoundTripper

NewLoggingRoundTripper creates a new LoggingRoundTripper with the given logger

func (*LoggingRoundTripper) RoundTrip

func (lrt *LoggingRoundTripper) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip implements the RoundTripper interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL