关于接口的极端菜鸟查询

With reference to this code

How to interpret this code?

(*http.ResponseWriter)(nil)

Is it type assertion or something else? I dont understand.

Also can interfaces have pointers?

Thanks

It's a nil pointer.

nil pointers have a type, in this case it's *http.ResponseWriter.

Edit to answer question in comment section:

The reason for doing this is that inject (Martini's dependency injector) maps an interface type to an implementation of that interface through MapTo.

As it's really only interested in the interface's type (as second argument), a nil pointer is enough.