aboutsummaryrefslogtreecommitdiff
path: root/internal/tool/file.go
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-03-01 14:55:03 +0800
committerGitHub <noreply@github.com>2020-03-01 14:55:03 +0800
commitf04b2d43509816ecfda93aa5d0d1fd685d9b860f (patch)
tree548c7b0b4ff2f187569e74cf99c19742a44f18aa /internal/tool/file.go
parent9c65798902386341a205d52b6b3842e1dc2c751a (diff)
lint: fix some Golang CI lint issues (#5955)
Diffstat (limited to 'internal/tool/file.go')
-rw-r--r--internal/tool/file.go20
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)
}