refactor: Use simpler error messages

This commit is contained in:
Felicitas Pojtinger
2021-12-09 17:48:57 +01:00
parent 20f30d0135
commit bc7793360f
12 changed files with 41 additions and 45 deletions
+2 -2
View File
@@ -51,7 +51,7 @@ func Compress(
}
if !isRegular {
return nil, config.ErrCompressionFormatOnlyRegularSupport // "device or resource busy"
return nil, config.ErrCompressionFormatRegularOnly // "device or resource busy"
}
l := pgzip.DefaultCompression
@@ -131,7 +131,7 @@ func Compress(
return zz, nil
case config.CompressionFormatBrotliKey:
if !isRegular {
return nil, config.ErrCompressionFormatOnlyRegularSupport // "cannot allocate memory"
return nil, config.ErrCompressionFormatRegularOnly // "cannot allocate memory"
}
l := brotli.DefaultCompression