diff options
author | Alex Crawford <wally@code.acrawford.com> | 2021-04-07 15:32:56 -0700 |
---|---|---|
committer | Alex Crawford <wally@code.acrawford.com> | 2021-04-07 16:07:52 -0700 |
commit | c579dc8aaf592804f381a35796ec1a30aeb20459 (patch) | |
tree | 787204fe4efe09f4772dc4be461e29e6cb958cf1 | |
parent | f82dc4c66c2b2342f52b99651e75ecda4a2c39bb (diff) |
main: remove output coloring
ANSI colors should only be used when stdout is a TTY. Because this
library doesn't support detection [0], it's easier just to remove it.
[0]: https://github.com/logrusorgru/aurora/tree/806901bec141cfa65f25b4472d5fb1b461609771#tty
-rw-r--r-- | main.go | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -3,7 +3,6 @@ package main import ( "fmt" "github.com/caarlos0/spin" - "github.com/logrusorgru/aurora" "gopkg.in/cheggaaa/pb.v1" "os" "path/filepath" @@ -23,25 +22,25 @@ func main() { s := state{step: 0, total: 0, sent: 0} if len(args) != 1 { - fmt.Println(aurora.Blue("Usage: wally-cli <firmware file>")) + fmt.Println("Usage: wally-cli <firmware file>") os.Exit(2) } if args[0] == "--version" { appVersion := fmt.Sprintf("wally-cli v%s", appVersion) - fmt.Println(aurora.Blue(appVersion)) + fmt.Println(appVersion) os.Exit(0) } path := args[0] extension := filepath.Ext(path) if extension != ".bin" && extension != ".hex" { - fmt.Println(aurora.Red("Please provide a valid firmware file: a"), aurora.Red(aurora.Underline(".hex")), aurora.Red("file (ErgoDox EZ) or a"), aurora.Red(aurora.Underline(".bin")), aurora.Red("file (Moonlander / Planck EZ)")) + fmt.Println("Please provide a valid firmware file: a .hex file (ErgoDox EZ) or a .bin file (Moonlander / Planck EZ)") os.Exit(2) } if _, err := os.Stat(path); os.IsNotExist(err) { - fmt.Println(aurora.Red("The file path you specified does not exist")) + fmt.Println("The file path you specified does not exist") os.Exit(1) } @@ -74,5 +73,5 @@ func main() { } } progress.Finish() - fmt.Println(aurora.Green("Your keyboard was successfully flashed and rebooted. Enjoy the new firmware!")) + fmt.Println("Your keyboard was successfully flashed and rebooted. Enjoy the new firmware!") } |