util

package
v1.13.0-go1.9to1.15 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: MIT Imports: 9 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsciiToLowerCase added in v1.4.2

func AsciiToLowerCase(input string) string

func CleanUrlPath

func CleanUrlPath(urlPath string) string

func CompareNumInFilename added in v1.8.0

func CompareNumInFilename(prev, next []byte) (less, ok bool)

func Contains

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

func ExtractHostnamePort added in v1.9.0

func ExtractHostnamePort(host string) (hostname, port string)

func ExtractListenPort added in v1.9.0

func ExtractListenPort(listen string) string

func FormatTimeSecond

func FormatTimeSecond(t time.Time) string

func GetBoolEnv added in v1.13.0

func GetBoolEnv(key string) bool

func GetContentType added in v1.11.0

func GetContentType(filename string, rd io.Reader) (string, error)

func GetTTYFile added in v1.13.0

func GetTTYFile() (file *os.File, teardown func() error)

func HasFsPrefixDir

func HasFsPrefixDir(fsPath, prefix string) bool

func HasUrlPrefixDir

func HasUrlPrefixDir(urlPath, prefix string) bool

func HasUrlPrefixDirNoCase added in v1.12.0

func HasUrlPrefixDirNoCase(urlPath, prefix string) bool

func IsDigits

func IsDigits(input string) bool

func IsStrEqualAccurate added in v1.13.0

func IsStrEqualAccurate(a, b string) bool

func IsStrEqualNoCase added in v1.13.0

func IsStrEqualNoCase(a, b string) bool

func NormalizeFsPath added in v1.4.2

func NormalizeFsPath(input string) (string, error)

func SplitFilename

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

func WildcardToRegexp

func WildcardToRegexp(wildcard string) string

Types

type StrEqualFunc added in v1.13.0

type StrEqualFunc func(a, b string) bool

Jump to

Keyboard shortcuts

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