Documentation
¶
Index ¶
- Constants
- func DownloadAndExtractLatestRelease(repoURL, targetDir string, forceDownload bool) error
- func GetFileExt(url string) string
- func IsValidIP(ip string) (ipv4 bool, err error)
- func ParseNetworkInput(input string) []string
- func ParsePortRange(portStr string) (ports []int)
- func RandStringBytes(n int) string
- func RemoveAnyDuplicate[T comparable](list []T) []T
- func RemoveStrSliceDuplicate(slice []string) (result []string)
- type GitHubRelease
Constants ¶
View Source
const ( UpperChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" NumChar = "1234567890" WordChar = UpperChar + lowerChar FullChar = WordChar + NumChar )
Variables ¶
This section is empty.
Functions ¶
func DownloadAndExtractLatestRelease ¶ added in v0.1.5
func GetFileExt ¶ added in v0.0.3
func ParseNetworkInput ¶
func ParsePortRange ¶ added in v0.0.6
1,2,80-100,...
func RandStringBytes ¶ added in v0.0.3
func RemoveAnyDuplicate ¶ added in v0.0.6
func RemoveAnyDuplicate[T comparable](list []T) []T
func RemoveStrSliceDuplicate ¶ added in v0.0.9
Types ¶
type GitHubRelease ¶ added in v0.1.5
type GitHubRelease struct {
TagName string `json:"tag_name"`
ZipballURL string `json:"zipball_url"`
}
func CheckUpdate ¶ added in v0.1.5
func CheckUpdate(repoURL, targetDir string, forceDownload bool) (needUpdate bool, repo string, release *GitHubRelease, err error)
返回 (needDownload bool, err error)
Click to show internal directories.
Click to hide internal directories.