initialize lowest to maxint

This commit is contained in:
onyx-and-iris 2023-12-06 16:55:59 +00:00
parent 60ef7a0557
commit 9fd4f8131a

View File

@ -1,6 +1,8 @@
package main
import (
"math"
log "github.com/sirupsen/logrus"
)
@ -31,15 +33,12 @@ func next(i int, datapoint int) int {
// one returns the lowest location
func one(lines []string) (int, error) {
lowest := 0
lowest := math.MaxInt
parseLines(lines)
for _, seed := range seeds {
location := next(0, seed)
log.Info(location)
if lowest == 0 {
lowest = location
}
if location < lowest {
lowest = location
}