Documentation ¶
Index ¶
- func EncodePath(path string, all ...bool) string
- func Ext(path string) string
- func FixAndCleanPath(path string) string
- func IsBool(bs ...bool) bool
- func IsCanceled(ctx context.Context) bool
- func IsSubPath(path string, subPath string) bool
- func JoinBasePath(basePath, reqPath string) (string, error)
- func MustParseCNTime(str string) time.Time
- func MustSliceConvert[S any, D any](srcS []S, convert func(src S) D) []D
- func NewDebounce(interval time.Duration) func(f func())
- func NewDebounce2(interval time.Duration, f func()) func()
- func PathAddSeparatorSuffix(path string) string
- func PathEqual(path1, path2 string) bool
- func SliceContains[T comparable](arr []T, v T) bool
- func SliceConvert[S any, D any](srcS []S, convert func(src S) (D, error)) ([]D, error)
- func SliceEqual[T comparable](a, b []T) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePath ¶
func FixAndCleanPath ¶
FixAndCleanPath The upper layer of the root directory is still the root directory. So ".." And "." will be cleared for example 1. ".." or "." => "/" 2. "../..." or "./..." => "/..." 3. "../.x." or "./.x." => "/.x." 4. "x//\\y" = > "/z/x"
func IsCanceled ¶
func JoinBasePath ¶
func MustParseCNTime ¶
func MustSliceConvert ¶
func NewDebounce ¶
func NewDebounce2 ¶
func PathAddSeparatorSuffix ¶
PathAddSeparatorSuffix Add path '/' suffix for example /root => /root/
func SliceContains ¶
func SliceContains[T comparable](arr []T, v T) bool
SliceContains check if slice contains element
func SliceConvert ¶
SliceConvert convert slice to another type slice
func SliceEqual ¶
func SliceEqual[T comparable](a, b []T) bool
SliceEqual check if two slices are equal
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
@Author: LinkLeong link@icewhale.com
|
@Author: LinkLeong link@icewhale.com |
Click to show internal directories.
Click to hide internal directories.