ci,mod,graph/iterator: bump minimum version to go1.18
MODIFY
.github/workflows/ci.yml
.github/workflows/ci.yml
@@ -12,7 +12,7 @@ jobs:
matrix:
# Do not move this line; it is referred to by README.md.
# Versions of Go that are explicitly supported by Gonum.
- go-version: [1.18.x, 1.17.x]
+ go-version: [1.19.x, 1.18.x]
platform: [ubuntu-latest, macos-latest]
force-goarch: ["", "386"]
tags:

MODIFY
go.mod
go.mod
module gonum.org/v1/gonum
-go 1.17
+go 1.18
require (
github.com/google/go-cmp v0.5.7

MODIFY
graph/iterator/nodes_map_safe.go
graph/iterator/nodes_map_safe.go
@@ -61,8 +61,7 @@ func (n *Nodes) Node() graph.Node {
func (n *Nodes) Reset() {
n.curr = nil
n.pos = 0
- // TODO(kortschak): Use n.iter.Reset(n.nodes) when it is available and Go1.17 is no longer supported.
- n.iter = n.nodes.MapRange()
+ n.iter.Reset(n.nodes)
}
// NodeSlice returns all the remaining nodes in the iterator and advances

ci,mod,graph/iterator: bump minimum version to go1.18