mirror of
https://github.com/byReqz/go-etcher.git
synced 2024-11-22 15:01:16 +00:00
remove clutter
This commit is contained in:
parent
95f4d1d682
commit
e9ac06c8cf
15
main.go
15
main.go
@ -182,18 +182,11 @@ func main() {
|
|||||||
s.Stop()
|
s.Stop()
|
||||||
fmt.Println("\r[", color.RedString("✘"), "] Getting file details ")
|
fmt.Println("\r[", color.RedString("✘"), "] Getting file details ")
|
||||||
log.Fatal(err)
|
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)
|
image, err := os.Open(input)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.Stop()
|
s.Stop()
|
||||||
fmt.Println("\r[", color.RedString("✘"), "] Opening files ")
|
fmt.Println("\r[", color.RedString("✘"), "] Getting file details ")
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
var inputsize int64
|
var inputsize int64
|
||||||
@ -209,7 +202,7 @@ func main() {
|
|||||||
target, err := os.OpenFile(device, os.O_RDWR, 0660)
|
target, err := os.OpenFile(device, os.O_RDWR, 0660)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.Stop()
|
s.Stop()
|
||||||
fmt.Println("\r[", color.RedString("✘"), "] Opening files ")
|
fmt.Println("\r[", color.RedString("✘"), "] Getting file details ")
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
var targetsize int64
|
var targetsize int64
|
||||||
@ -224,11 +217,11 @@ func main() {
|
|||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.Stop()
|
s.Stop()
|
||||||
fmt.Println("\r[", color.RedString("✘"), "] Opening files ")
|
fmt.Println("\r[", color.RedString("✘"), "] Getting file details ")
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
} else {
|
} else {
|
||||||
s.Stop()
|
s.Stop()
|
||||||
fmt.Println("\r[", color.GreenString("✓"), "] Opening files ")
|
fmt.Println("\r[", color.GreenString("✓"), "] Getting file details ")
|
||||||
}
|
}
|
||||||
inputmb := fmt.Sprint("[", inputsize / 1024 / 1024, "MB]")
|
inputmb := fmt.Sprint("[", inputsize / 1024 / 1024, "MB]")
|
||||||
devicemb := fmt.Sprint("[", targetsize / 1024 / 1024, "MB]")
|
devicemb := fmt.Sprint("[", targetsize / 1024 / 1024, "MB]")
|
||||||
|
Loading…
Reference in New Issue
Block a user