updated args

main
Arkadyuti Sarkar 2023-03-20 15:46:30 +05:30
parent 69bbeeee3b
commit d96ad46d45
1 changed files with 3 additions and 1 deletions

View File

@ -25,10 +25,12 @@ func readArgs() {
inputPath = os.Args[1]
outPath = os.Args[2]
i, _ := strconv.Atoi(os.Args[3])
if i <= 0 {
finalWidth = uint(i)
if finalWidth <= 0 {
fmt.Println("Wrong input for resolution, arguments: <source_dir> <dest_dir> <width_resolution_px>")
os.Exit(1)
}
}
}