refactor: clean code

This commit is contained in:
Fu Diwei
2025-05-28 22:43:18 +08:00
parent e73e2739c1
commit f0af36b59e
43 changed files with 62 additions and 62 deletions

View File

@@ -18,10 +18,10 @@ func newTransport(mac *auth.Credentials, tr http.RoundTripper) *transport {
return &transport{tr, mac}
}
func (t *transport) RoundTrip(req *http.Request) (resp *http.Response, err error) {
func (t *transport) RoundTrip(req *http.Request) (*http.Response, error) {
token, err := t.mac.SignRequestV2(req)
if err != nil {
return
return nil, err
}
req.Header.Set("Authorization", "Qiniu "+token)