util

package
v1.15.8 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 11 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HasFsPrefixDir = HasFsPrefixDirAccurate
View Source
var HasUrlPrefixDir = HasUrlPrefixDirAccurate
View Source
var IsPathEqual = IsStrEqualAccurate

Functions

func AppendTimeSecond added in v1.15.1

func AppendTimeSecond(buf []byte, t time.Time) []byte

func AsciiToLowerCase added in v1.4.2

func AsciiToLowerCase(input string) string

func ByteToHex added in v1.13.7

func ByteToHex(b byte) (high, low byte)

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 EscapeControllingRune added in v1.13.7

func EscapeControllingRune(str string) []byte

func ExtractHostFromUrl added in v1.15.0

func ExtractHostFromUrl(url string) string

func ExtractHostnamePort added in v1.9.0

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

func ExtractHostsFromUrls added in v1.15.0

func ExtractHostsFromUrls(urls []string) []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 HasFsPrefixDirAccurate added in v1.15.0

func HasFsPrefixDirAccurate(fsPath, prefix string) bool

func HasFsPrefixDirNoCase added in v1.15.0

func HasFsPrefixDirNoCase(fsPath, prefix string) bool

func HasUrlPrefixDirAccurate added in v1.15.0

func HasUrlPrefixDirAccurate(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 NormalizeUrlPath added in v1.15.0

func NormalizeUrlPath(input string) (string, error)

func SplitFilename

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

func WildcardToStrRegexp added in v1.15.1

func WildcardToStrRegexp(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