From 7bb8b79221740dd4a6d9a63c035e46087f4680fb Mon Sep 17 00:00:00 2001 From: tjpcc Date: Thu, 31 Aug 2023 20:26:54 -0600 Subject: minor for loop cleanup --- gopher/gophermap/parse.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gopher/gophermap') diff --git a/gopher/gophermap/parse.go b/gopher/gophermap/parse.go index 17fe833..3317514 100644 --- a/gopher/gophermap/parse.go +++ b/gopher/gophermap/parse.go @@ -16,9 +16,7 @@ func Parse(input io.Reader) (gopher.MapDocument, error) { rdr := bufio.NewReader(input) doc := gopher.MapDocument{} - num := 0 - for { - num += 1 + for num := 1; ; num += 1 { line, err := rdr.ReadBytes('\n') isEOF := errors.Is(err, io.EOF) if err != nil && !isEOF { -- cgit v1.2.3