diff --git a/config/configcompression/compressionType.go b/config/configcompression/compressionType.go index 3ab33c62cea..d38435c8702 100644 --- a/config/configcompression/compressionType.go +++ b/config/configcompression/compressionType.go @@ -24,12 +24,12 @@ const ( Deflate CompressionType = "deflate" Snappy CompressionType = "snappy" Zstd CompressionType = "zstd" - None CompressionType = "none" - Empty CompressionType = "" + none CompressionType = "none" + empty CompressionType = "" ) func IsCompressed(compressionType CompressionType) bool { - return compressionType != Empty && compressionType != None + return compressionType != empty && compressionType != none } func (ct *CompressionType) UnmarshalText(in []byte) error { @@ -39,8 +39,8 @@ func (ct *CompressionType) UnmarshalText(in []byte) error { Deflate, Snappy, Zstd, - None, - Empty: + none, + empty: *ct = typ return nil default: diff --git a/config/configcompression/compressionType_test.go b/config/configcompression/compressionType_test.go index d15d630281f..29607191126 100644 --- a/config/configcompression/compressionType_test.go +++ b/config/configcompression/compressionType_test.go @@ -70,7 +70,7 @@ func TestUnmarshalText(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - temp := None + temp := none err := temp.UnmarshalText(tt.compressionName) if tt.shouldError { assert.Error(t, err)