package main
import (
    "fmt"
    "github.com/gin-gonic/gin"
)
func Foo(ctx *gin.Context) {}
func main() {
    var v interface{}
    v = Foo
    _, ok := v.(func(*gin.Context))
    fmt.Println(ok) // true
    _, ok = v.(gin.HandlerFunc)
    fmt.Println(ok) // false
}
I have a function of interface type and want to convert it to gin.HandlerFunc, but what I can't understand is why the second assertion fails, I hope to get an answer, thank you