Browse Source

Simplify

content-update
xpetit 3 years ago
parent
commit
f515ec27f8
No known key found for this signature in database
GPG Key ID: 97C60669182C17A5
  1. 9
      sh/debian/ubuntu/system/usr/local/src/format/main.go

9
sh/debian/ubuntu/system/usr/local/src/format/main.go diff.vendored

@ -170,13 +170,10 @@ func main() {
return return
} }
var nb int var nb int
if len(devices) > 1 { if choice != "" {
nb, err := strconv.Atoi(choice) nb, err := strconv.Atoi(choice)
if err != nil { if err != nil || nb < 0 || nb >= len(devices) {
fatalln("Wrong disk number", choice) fatalln("Wrong disk number:", choice)
}
if nb < 0 || nb >= len(devices) {
fatalln("Wrong disk number, choose between", 0, "and", len(devices)-1)
} }
} }
device := devices[nb] device := devices[nb]

Loading…
Cancel
Save