refactor: fix lint errors; improve error handling

This commit is contained in:
yusing
2026-02-22 16:04:25 +08:00
parent 3a7d1f8b18
commit 0f78158c64
40 changed files with 191 additions and 136 deletions

View File

@@ -27,7 +27,6 @@ type HTTPConfig struct {
// BuildTLSConfig creates a TLS configuration based on the HTTP config options.
func (cfg *HTTPConfig) BuildTLSConfig(targetURL *url.URL) (*tls.Config, error) {
//nolint:gosec
tlsConfig := &tls.Config{}
// Handle InsecureSkipVerify (legacy NoTLSVerify option)

View File

@@ -8,6 +8,7 @@ import (
gperr "github.com/yusing/goutils/errs"
)
//nolint:recvcheck
type Scheme uint8
var ErrInvalidScheme = errors.New("invalid scheme")