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.