Documentation ¶
Overview ¶
* @Author: LinkLeong a624669980@163.com * @Date: 2022-05-08 14:58:46 * @LastEditors: LinkLeong a624669980@163.com * @LastEditTime: 2022-05-09 13:42:26 * @FilePath: /CasaOS/pkg/utils/network_detection.go * @Description: * * Copyright (c) 2022 by LinkLeong a624669980@163.com, All Rights Reserved.
* @Author: LinkLeong link@icewhale.org * @Date: 2022-08-10 16:06:12 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-10 16:11:37 * @FilePath: /CasaOS/pkg/utils/udev_helper.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
Index ¶
- func EncodePath(path string, all ...bool) string
- func Ext(path string) string
- func FixAndCleanPath(path string) string
- func GetActualMountPath(virtualPath string) string
- func GetNetWorkTypeDetection(data chan string, url string)
- func IsBalance(str string) bool
- 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 ¶ added in v0.4.2
func FixAndCleanPath ¶ added in v0.4.2
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 GetActualMountPath ¶ added in v0.4.2
GetActualMountPath remove balance suffix
func GetNetWorkTypeDetection ¶
*
- @description:
- @param {chanstring} data
- @param {string} url
- @return {*}
func IsCanceled ¶ added in v0.4.2
func JoinBasePath ¶ added in v0.4.2
func MustParseCNTime ¶ added in v0.4.2
func MustSliceConvert ¶ added in v0.4.2
func NewDebounce ¶ added in v0.4.2
func NewDebounce2 ¶ added in v0.4.2
func PathAddSeparatorSuffix ¶ added in v0.4.2
PathAddSeparatorSuffix Add path '/' suffix for example /root => /root/
func SliceContains ¶ added in v0.4.2
func SliceContains[T comparable](arr []T, v T) bool
SliceContains check if slice contains element
func SliceConvert ¶ added in v0.4.2
SliceConvert convert slice to another type slice
func SliceEqual ¶ added in v0.4.2
func SliceEqual[T comparable](a, b []T) bool
SliceEqual check if two slices are equal
Types ¶
This section is empty.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
* @Author: LinkLeong link@icewhale.com * @Date: 2022-06-14 14:33:25 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-14 14:33:49 * @FilePath: /CasaOS/pkg/utils/encryption/md5_helper.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
|
* @Author: LinkLeong link@icewhale.com * @Date: 2022-06-14 14:33:25 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-14 14:33:49 * @FilePath: /CasaOS/pkg/utils/encryption/md5_helper.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved. |
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong * @LastEditTime: 2022-07-21 15:27:53 * @FilePath: /CasaOS/pkg/utils/version/version.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
|
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong * @LastEditTime: 2022-07-21 15:27:53 * @FilePath: /CasaOS/pkg/utils/version/version.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved. |