Skip to content

Commit

Permalink
fix: internalized compressionNone and compressionEmpty
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunuk committed Jan 8, 2022
1 parent 6a456be commit 3bd0f2c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions config/configcompression/compressionType.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -39,8 +39,8 @@ func (ct *CompressionType) UnmarshalText(in []byte) error {
CompressionDeflate,
CompressionSnappy,
CompressionZstd,
CompressionNone,
CompressionEmpty:
compressionNone,
compressionEmpty:
*ct = typ
return nil
default:
Expand Down

0 comments on commit 3bd0f2c

Please sign in to comment.