From 3bd0f2c69e13eab3eecc977dd0394324ee9233ad Mon Sep 17 00:00:00 2001 From: Hyunuk Date: Fri, 7 Jan 2022 16:41:12 -0800 Subject: [PATCH] fix: internalized compressionNone and compressionEmpty --- config/configcompression/compressionType.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/configcompression/compressionType.go b/config/configcompression/compressionType.go index 894ec9cfa42..8ca87a43312 100644 --- a/config/configcompression/compressionType.go +++ b/config/configcompression/compressionType.go @@ -24,12 +24,12 @@ const ( CompressionDeflate CompressionType = "deflate" CompressionSnappy CompressionType = "snappy" CompressionZstd CompressionType = "zstd" - CompressionNone CompressionType = "none" - CompressionEmpty CompressionType = "" + compressionNone CompressionType = "none" + compressionEmpty CompressionType = "" ) func IsCompressed(compressionType CompressionType) bool { - return compressionType != CompressionEmpty && compressionType != CompressionNone + return compressionType != compressionEmpty && compressionType != compressionNone } func (ct *CompressionType) UnmarshalText(in []byte) error { @@ -39,8 +39,8 @@ func (ct *CompressionType) UnmarshalText(in []byte) error { CompressionDeflate, CompressionSnappy, CompressionZstd, - CompressionNone, - CompressionEmpty: + compressionNone, + compressionEmpty: *ct = typ return nil default: