aboutsummaryrefslogtreecommitdiff
path: root/pkg/ext/compression.go
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-06-23 17:47:50 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-06-23 17:51:05 +0200
commit9e210f61a6259c37cc7938cf353527cf072b3eda (patch)
tree5f2855377262b2e915ebf801502c835d6bcec75b /pkg/ext/compression.go
parentba84c0d82066739adbca468846a2688e02432b6f (diff)
downloadcerrado-9e210f61a6259c37cc7938cf353527cf072b3eda.tar.gz
cerrado-9e210f61a6259c37cc7938cf353527cf072b3eda.tar.bz2
cerrado-9e210f61a6259c37cc7938cf353527cf072b3eda.zip
ref: User correct err naming
Diffstat (limited to 'pkg/ext/compression.go')
-rw-r--r--pkg/ext/compression.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/ext/compression.go b/pkg/ext/compression.go
index 9e933ef..6c7a219 100644
--- a/pkg/ext/compression.go
+++ b/pkg/ext/compression.go
@@ -16,7 +16,7 @@ import (
)
var (
- invalidParamErr = errors.New("Invalid weighted param")
+ errInvalidParam = errors.New("Invalid weighted param")
)
type CompressionResponseWriter struct {
@@ -135,7 +135,7 @@ func GetLZWWriter(w io.Writer) io.WriteCloser {
func getWeighedValue(part string) (float64, error) {
ps := strings.SplitN(part, "=", 2)
if len(ps) != 2 {
- return 0, invalidParamErr
+ return 0, errInvalidParam
}
if name := strings.TrimSpace(ps[0]); name == "q" {
w, err := strconv.ParseFloat(ps[1], 64)
@@ -145,5 +145,5 @@ func getWeighedValue(part string) (float64, error) {
return w, nil
}
- return 0, invalidParamErr
+ return 0, errInvalidParam
}