MCPcopy Index your code
hub / github.com/MengMengCode/GetRealityDomain / clearScreenSystem

Function clearScreenSystem

main.go:446–455  ·  view source on GitHub ↗

使用系统清屏命令

()

Source from the content-addressed store, hash-verified

444
445// 使用系统清屏命令
446func clearScreenSystem() {
447 // 尝试使用系统的clear命令
448 cmd := exec.Command("clear")
449 cmd.Stdout = os.Stdout
450 err := cmd.Run()
451 if err != nil {
452 // 如果clear命令失败,使用ANSI转义序列
453 fmt.Print("\033[2J\033[H")
454 }
455}
456
457// 打印带边框的文本
458func printBox(lines []string) {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected