summaryrefslogtreecommitdiff
path: root/gopher
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-08-31 20:26:54 -0600
committertjpcc <tjp@ctrl-c.club>2023-08-31 20:26:54 -0600
commit7bb8b79221740dd4a6d9a63c035e46087f4680fb (patch)
treef6530bf610835b961b3cf79c8cfb1528525f71ab /gopher
parent7116f79e7a67d83a6ae6cc59316d8b5b63dc774c (diff)
minor for loop cleanup
Diffstat (limited to 'gopher')
-rw-r--r--gopher/gophermap/parse.go4
1 files changed, 1 insertions, 3 deletions
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 {