Skip to content

Commit

Permalink
Fix error happens when no data was captured
Browse files Browse the repository at this point in the history
  • Loading branch information
haccht committed Nov 10, 2023
1 parent 58afc4c commit a192f71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ func run() error {
return err
}

if len(vals) == 0 {
fmt.Printf("Total count = 0\n")
return nil
}

sort.Float64s(vals)

min := vals[0]
Expand Down

0 comments on commit a192f71

Please sign in to comment.