util

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: MIT Imports: 6 Imported by: 12

Documentation

Index

Constants

View Source
const (
	B = 1 << (iota * 10)
	KB
	MB
	GB
	TB
	PB
)

Variables

This section is empty.

Functions

func CleanUrlPath

func CleanUrlPath(urlPath string) string

func CompareNumInStr

func CompareNumInStr(prev, next string) bool

func Contains

func Contains(collection []string, find string) bool

func FormatSize

func FormatSize(size int64) string

func FormatTimeMinute

func FormatTimeMinute(t time.Time) string

func FormatTimeSecond

func FormatTimeSecond(t time.Time) string

func HasFsPrefixDir

func HasFsPrefixDir(fsPath, prefix string) bool

func HasUrlPrefixDir

func HasUrlPrefixDir(urlPath, prefix string) bool

func SplitFilename

func SplitFilename(filename string) (prefix, suffix string)

func WildcardToRegexp

func WildcardToRegexp(wildcard string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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