utils

package
v0.1.48 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StackType string

Functions

func BasicsAndSecurityCheck added in v0.0.84

func BasicsAndSecurityCheck(language, nt3CheckType string, securityCheckStatus bool) (string, string, string)

BasicsAndSecurityCheck 执行安全检查

func CaptureOutput

func CaptureOutput(f func()) string

CaptureOutput 捕获函数输出和错误输出,实时输出,并返回字符串

func CheckChina added in v0.0.33

func CheckChina(enableLogger bool) bool

func PrintAndCapture

func PrintAndCapture(f func(), tempOutput, output string) string

PrintAndCapture 捕获函数输出的同时打印内容

func PrintCenteredTitle

func PrintCenteredTitle(title string, width int)

PrintCenteredTitle 根据指定的宽度打印居中标题

func PrintHead

func PrintHead(language string, width int, ecsVersion string)

PrintHead 根据语言打印头部信息

func ProcessAndUpload added in v0.0.14

func ProcessAndUpload(output string, filePath string, enableUplaod bool) (string, string)

ProcessAndUpload 创建结果文件并上传文件

func UploadText

func UploadText(absPath string) (string, string, error)

UploadText 上传文本内容到指定URL

Types

type NetCheckResult added in v0.1.38

type NetCheckResult struct {
	HasIPv4   bool
	HasIPv6   bool
	Connected bool
	StackType string // "IPv4", "IPv6", "DualStack", "None"
}

func CheckPublicAccess added in v0.1.38

func CheckPublicAccess(timeout time.Duration) NetCheckResult

Jump to

Keyboard shortcuts

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