Add v2 network package

This commit is contained in:
9seconds
2026-02-27 15:50:21 +01:00
parent 282896be09
commit 42927c8bdc
15 changed files with 714 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
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
}