functions

package
v0.0.0-...-f176acd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const KB = 1024

Variables

View Source
var SIZES = []string{"B", "KB", "MB", "GB"}

Functions

func CalcFileSize

func CalcFileSize(file *multipart.FileHeader) (*string, error)

func GetImageSize

func GetImageSize(file *multipart.FileHeader) (int, int, error)

func ParseFileKey

func ParseFileKey(DownloadPath string) string

func RandomString

func RandomString(strlen int) string

生成随机字符串, 用来实现Token

Types

type Size

type Size interface {
	Size() int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL