diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-03-01 14:55:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-01 14:55:03 +0800 |
commit | f04b2d43509816ecfda93aa5d0d1fd685d9b860f (patch) | |
tree | 548c7b0b4ff2f187569e74cf99c19742a44f18aa /internal/tool/file.go | |
parent | 9c65798902386341a205d52b6b3842e1dc2c751a (diff) |
lint: fix some Golang CI lint issues (#5955)
Diffstat (limited to 'internal/tool/file.go')
-rw-r--r-- | internal/tool/file.go | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/internal/tool/file.go b/internal/tool/file.go index 6ca4136a..169bc511 100644 --- a/internal/tool/file.go +++ b/internal/tool/file.go @@ -31,26 +31,6 @@ func IsVideoFile(data []byte) bool { return strings.Contains(http.DetectContentType(data), "video/") } -const ( - Byte = 1 - KByte = Byte * 1024 - MByte = KByte * 1024 - GByte = MByte * 1024 - TByte = GByte * 1024 - PByte = TByte * 1024 - EByte = PByte * 1024 -) - -var bytesSizeTable = map[string]uint64{ - "b": Byte, - "kb": KByte, - "mb": MByte, - "gb": GByte, - "tb": TByte, - "pb": PByte, - "eb": EByte, -} - func logn(n, b float64) float64 { return math.Log(n) / math.Log(b) } |