utils

package
v0.0.0-...-b1bbe90 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNetAddr

func CheckNetAddr(addr string) bool

func ExecuteCommandAny

func ExecuteCommandAny(cmdPath string, args ...string)

func ExecuteCommandCheckLocale

func ExecuteCommandCheckLocale(cmdstr string) int

func ExecuteCommandSSH

func ExecuteCommandSSH(args ...string)

func FileExists

func FileExists(path string) bool

判断所给路径文件/文件夹是否存在

func InputHostId

func InputHostId() int

func InputInt

func InputInt(msg string) int

func InputPort

func InputPort(msg string) int

func InputString

func InputString(msg string) string

func IsExecute

func IsExecute(path string) (bool, error)

判断所给文件是否有可执行权限

func IsReadable

func IsReadable(f string) bool

func IsSupportZhCn

func IsSupportZhCn()

func IsWritable

func IsWritable(f string) bool

func PathExists

func PathExists(path string) (bool, error)

判断所给路径文件/文件夹是否存在

func RandStringBytes

func RandStringBytes(n int, letter bool) string

func RemoteRequest

func RemoteRequest(url string, params any, requestMethod string) bool

func Sha3

func Sha3(data string) string

func Sshkeygen

func Sshkeygen(pwd string) (string, string, error)

调用ssh-keygen生成ssh秘钥; 返回第一个为私钥,第二个为公钥

func String2Int

func String2Int(s string) int

func String2IntDefault

func String2IntDefault(s string, defVal int) int

func ValiedIP

func ValiedIP(ip string) bool

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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