return value of Type.String() for function type doesn't match Go's reflect pkg (original) (raw)

Return value of Type.String() for function type doesn't match equivalent call using Go's reflect package.

The code snippet below produces:

f := func(int, string) (bool, error) { return false, nil } rt := reflect.TypeOf(f) fmt.Println(rt.String())