Files
Abiola IbrahimandGitHub 3af7c5184b net: configurable network driver (#399)
* misc: minor typo in docs

* net: introduce configurable network driver

* net: fix default in template

* ci: fix lint errors

* net: fix regression

* net: addn docker hostname for slirp network
2022-08-17 17:58:34 +01:00

20 lines
259 B
Go

package terminal
import (
"fmt"
"os"
"golang.org/x/term"
)
var isTerminal = term.IsTerminal(int(os.Stdout.Fd()))
// ClearLine clears the previous line of the terminal
func ClearLine() {
if !isTerminal {
return
}
fmt.Print("\033[1A \033[2K \r")
}