Documentation ¶
Overview ¶
Package io @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Package io @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Index ¶
- Constants
- func ByteCountIEC(b int64) string
- func ByteCountSI(b int64) string
- func CloseFile(f http.File)
- func GetContentType(fileName string) (extension, contentType string)
- func RespBody(reader io.Reader) ([]byte, string)
- func RespReadAll(reader io.Reader) []byte
- func ToBytes(size int64, unit Type) int64
- type Type
Constants ¶
View Source
const ( KB int64 = 1 << (10 * iota) MB GB TB )
将KB、MB、GB和TB转换为字节的
View Source
const ( KBType = "kb" MBType = "mb" GBType = "gb" TBType = "tb" )
Variables ¶
This section is empty.
Functions ¶
func GetContentType ¶
GetContentType 根据文件后缀获取文文件类型 @return extension 文件后缀 @return contentType 文件类型
func RespReadAll ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.