diff options
| author | Jeff Carr <[email protected]> | 2025-03-26 04:48:36 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-26 20:44:06 -0500 |
| commit | 601bfa073999306d647a5af70d6aa9814ddb139f (patch) | |
| tree | 3abe0a025b2ce75eae39710f251b7a6b37fbd6c8 /generateSort.go | |
| parent | 4ab3a465af1d6fef6afe381b98817028da9f5d1e (diff) | |
correct usage of 'iterator' and 'scanner'
Diffstat (limited to 'generateSort.go')
| -rw-r--r-- | generateSort.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/generateSort.go b/generateSort.go index 4692884..7319812 100644 --- a/generateSort.go +++ b/generateSort.go @@ -44,8 +44,8 @@ func newIter(w io.Writer, msg *MsgName) string { // in this file where it is "new or "New". I changed it to lower case 2025.01.12 funcdef := "func new" + APPLE + "Iterator(things []*" + APPLE + ") *" + APPLE + "Iterator" - fmt.Fprintln(w, "// DEFINE THE", APPLE, "ITERATOR.") - fmt.Fprintln(w, "// itializes a new iterator.") + fmt.Fprintln(w, "// DEFINE THE", APPLE, "SCANNER.") + fmt.Fprintln(w, "// itializes a new scanner.") fmt.Fprintln(w, funcdef, "{") fmt.Fprintln(w, " return &"+APPLE+"Iterator{things: things}") fmt.Fprintln(w, "}") @@ -75,7 +75,7 @@ func newIter(w io.Writer, msg *MsgName) string { fmt.Fprintln(w, " return it.things[it.index-1]") fmt.Fprintln(w, "}") fmt.Fprintln(w, "") - fmt.Fprintln(w, "// END DEFINE THE ITERATOR") + fmt.Fprintln(w, "// END DEFINE THE SCANNER") fmt.Fprintln(w, "") return funcdef @@ -127,8 +127,8 @@ func (msg *MsgName) addIterAllFunc(w io.Writer, FRUIT, APPLE, APPLES string) str fmt.Fprintln(w, "") // should this be 'new' or 'New' ? Does it matter? I think it's totally internal here. I think there are only 3 places // in this file where it is "new or "New". I changed it to lower case 2025.01.12 - fmt.Fprintln(w, " iterator := new"+APPLE+"Iterator("+APPLE+"Pointers)") - fmt.Fprintln(w, " return iterator") + fmt.Fprintln(w, " scanner := new"+APPLE+"Iterator("+APPLE+"Pointers)") + fmt.Fprintln(w, " return scanner") fmt.Fprintln(w, "}") fmt.Fprintln(w, "") @@ -179,8 +179,8 @@ func (msg *MsgName) addAllFunc(w io.Writer, FRUIT, APPLE, APPLES string) string fmt.Fprintln(w, "") // should this be 'new' or 'New' ? Does it matter? I think it's totally internal here. I think there are only 3 places // in this file where it is "new or "New". I changed it to lower case 2025.01.12 - fmt.Fprintln(w, " iterator := new"+APPLE+"Iterator("+APPLE+"Pointers)") - fmt.Fprintln(w, " return iterator") + fmt.Fprintln(w, " scanneriterator := new"+APPLE+"Iterator("+APPLE+"Pointers)") + fmt.Fprintln(w, " return scanneriterator") fmt.Fprintln(w, "}") fmt.Fprintln(w, "") |
