github.com/fzfile/BaiduPCS-Go@v0.0.0-20200606205115-4408961cf336/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  }