From a5231993de6b3bda78972d3c2c429e808bbba967 Mon Sep 17 00:00:00 2001 From: haccht Date: Thu, 9 Nov 2023 11:18:14 +0900 Subject: [PATCH] Small refactor --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 8b3abf7..31762a7 100644 --- a/main.go +++ b/main.go @@ -55,8 +55,8 @@ func run() error { vals = append(vals, val) } } - if scanner.Err() != nil { - return scanner.Err() + if err := scanner.Err(); err != nil { + return err } sort.Float64s(vals)