1
0
mirror of https://github.com/byReqz/go-etcher.git synced 2024-11-25 08:14:54 +00:00

remove clutter

This commit is contained in:
Nils 2022-02-07 12:36:08 +01:00
parent 95f4d1d682
commit e9ac06c8cf
Signed by: byreqz
GPG Key ID: 396A62D7D436749E

15
main.go
View File

@ -182,18 +182,11 @@ func main() {
s.Stop()
fmt.Println("\r[", color.RedString("✘"), "] Getting file details ")
log.Fatal(err)
} else {
s.Stop()
fmt.Println("\r[", color.GreenString("✓"), "] Getting file details ")
}
s.Prefix = "[ "
s.Suffix = " ] Opening files"
s.Start()
image, err := os.Open(input)
if err != nil {
s.Stop()
fmt.Println("\r[", color.RedString("✘"), "] Opening files ")
fmt.Println("\r[", color.RedString("✘"), "] Getting file details ")
log.Fatal(err)
}
var inputsize int64
@ -209,7 +202,7 @@ func main() {
target, err := os.OpenFile(device, os.O_RDWR, 0660)
if err != nil {
s.Stop()
fmt.Println("\r[", color.RedString("✘"), "] Opening files ")
fmt.Println("\r[", color.RedString("✘"), "] Getting file details ")
log.Fatal(err)
}
var targetsize int64
@ -224,11 +217,11 @@ func main() {
}
if err != nil {
s.Stop()
fmt.Println("\r[", color.RedString("✘"), "] Opening files ")
fmt.Println("\r[", color.RedString("✘"), "] Getting file details ")
log.Fatal(err)
} else {
s.Stop()
fmt.Println("\r[", color.GreenString("✓"), "] Opening files ")
fmt.Println("\r[", color.GreenString("✓"), "] Getting file details ")
}
inputmb := fmt.Sprint("[", inputsize / 1024 / 1024, "MB]")
devicemb := fmt.Sprint("[", targetsize / 1024 / 1024, "MB]")