mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 10:44:02 +03:00
FILE / ScuroNeko/mtg
network/v2/http.go
Исходный файл и его история в репозитории.
15 lines
302 B
Go
15 lines
302 B
Go
package network
|
|
|
|
import "net/http"
|
|
|
|
type networkHTTPTransport struct {
|
|
userAgent string
|
|
next http.RoundTripper
|
|
}
|
|
|
|
func (n networkHTTPTransport) RoundTrip(req *http.Request) (*http.Response, error) {
|
|
req.Header.Set("User-Agent", n.userAgent)
|
|
|
|
return n.next.RoundTrip(req) //nolint: wrapcheck
|
|
}
|