github.com/qjfoidnh/BaiduPCS-Go@v0.0.0-20231011165705-caa18a3765f3/pcsliner/clear.go (about)

     1  // +build !windows
     2  
     3  package pcsliner
     4  
     5  import (
     6  	"fmt"
     7  )
     8  
     9  // ClearScreen 清空屏幕
    10  func (pl *PCSLiner) ClearScreen() {
    11  	ClearScreen()
    12  }
    13  
    14  // ClearScreen 清空屏幕
    15  func ClearScreen() {
    16  	fmt.Print("\x1b[H\x1b[2J")
    17  }