mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-17 08:36:55 +03:00
all: consistently use %w instead of %s in when error is passed to fmt.Errorf()
This allows consistently using errors.Is() for verifying whether the given error wraps some other known error.
This commit is contained in:
@@ -204,7 +204,7 @@ func gzipHandler(s *server, rh RequestHandler) http.HandlerFunc {
|
||||
var gzipHandlerWrapper = func() func(http.Handler) http.HandlerFunc {
|
||||
hw, err := gzhttp.NewWrapper(gzhttp.CompressionLevel(1))
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("BUG: cannot initialize gzip http wrapper: %s", err))
|
||||
panic(fmt.Errorf("BUG: cannot initialize gzip http wrapper: %w", err))
|
||||
}
|
||||
return hw
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user