Closed dolmen closed 7 months ago
as in
type Middleware = func(http.HandlerFunc) http.HandlerFunc
?
I guess I don't understand the difference in that specific case.
At runtime there will not be a specific type allocated. The availability of that specific named type is useless here as what matters is the func signature.
Check fmt.Printf("%T\n", Middleware(nil))
.
Ok, got it. Seems like a good idea. I'll get it done.
For maximum flexibility type Middleware should be a type alias as it doesn't export any method.