mirror of
https://github.com/octoleo/restic.git
synced 2024-11-27 07:16:40 +00:00
Fixed style hints from hound
- no else, when if has a return - Improve Comment on Function
This commit is contained in:
parent
08eb5b42eb
commit
4cb8fe3210
@ -83,14 +83,15 @@ func restoreTerminal() {
|
||||
var globalOpts = GlobalOptions{stdout: os.Stdout, stderr: os.Stderr}
|
||||
var parser = flags.NewParser(&globalOpts, flags.HelpFlag|flags.PassDoubleDash)
|
||||
|
||||
// Clear Line ASCII sequence is invalid on Windows so ignore it here
|
||||
// ClearLine creates a platform dependent string to clear the current
|
||||
// line, so it can be overwritten. ANSI sequences are not supported on
|
||||
// current windows cmd shell.
|
||||
func ClearLine() string {
|
||||
if runtime.GOOS == "windows" {
|
||||
// Ugly Workaround, write 79 Whitespaces and return
|
||||
return " \r"
|
||||
} else {
|
||||
return "\x1b[2K"
|
||||
}
|
||||
return "\x1b[2K"
|
||||
}
|
||||
|
||||
// Printf writes the message to the configured stdout stream.
|
||||
|
Loading…
Reference in New Issue
Block a user