utils

package
v0.0.0-...-eae9eac Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCertificate

func CreateCertificate() (string, string, error)

创建需要证书文件

func GetExePath

func GetExePath(name string) string

GetExePath 获取进程所在目录

func IoSwap

func IoSwap(src io.ReadWriteCloser, dst io.ReadWriteCloser)

func ParseArgs

func ParseArgs(ins interface{})

ParseArgs 解析命令行

type Args struct {
	LogDir string `arg:"dir" txt:"日志所在文件夹"`
	Model  int    `arg:"model" txt:"日志模型"`
	Flow   bool   `arg:"flow" txt:"是否滚动显示"`
}

支持的类型: string, int, int64, uint, uint64, float64, bool

func ParseArgsEx

func ParseArgsEx(args []string, ins interface{})

func StringSign

func StringSign(str, key string) string

字符串签名

func WriteAll

func WriteAll(w io.Writer, buf []byte) error

写入全部

Types

This section is empty.

Jump to

Keyboard shortcuts

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