thanks a lot man.
> and i think i mentioned this, but making "iterator/walker function types" that the iterator calls with the data from the current node, you can simplify isolating your per-node scope but also enable concurrent safe access to a shared state...
I'm sorry but I don't understand it. Could you please make an example?
Login to reply
Replies (1)
http library has several good examples
a simple one that can be part of path routers
these closures can themselves be interfaces as this very common example:
but another version that uses concrete types, and the distinction between them is that the data provided by the closure is - very often, builtin types:
http package - net/http - Go Packages
Package http provides HTTP client and server implementations.
http package - net/http - Go Packages
Package http provides HTTP client and server implementations.
filepath package - path/filepath - Go Packages
Package filepath implements utility routines for manipulating filename paths in a way compatible with the target operating system-defined file paths.