https://play.golang.org/p/6xMgjr1IyFD
var fn myHandler
fn = func(w http.ResponseWriter, r *http.Request) {
fn.GET(w, r)
}
Just wondering if it's possible somehow to write this in one line like so
var fn myHandler = func(w http.ResponseWriter, r *http.Request) {
fn.GET(w, r)
}
and if that would break Go if it was allowed to do so?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/87d4b11d-2c74-4416-a18d-6cda83f84003n%40googlegroups.com.