-
-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
go-type-to-string/converter.go
Lines 31 to 32 in 810c395
// Replace output when given type is `any` or `interface{}`, but not a custom interface. | |
func getInterfaceType(typeOfT reflect.Type) string { |
Why?
package main
import (
"fmt"
typetostring "github.com/samber/go-type-to-string"
)
func main() {
type I interface {}
fmt.Println(typetostring.GetType[I]()) // *main.I
fmt.Println(typetostring.GetType[*I]()) // *main.I
fmt.Println(typetostring.GetType[**I]()) // **main.I
}
Metadata
Metadata
Assignees
Labels
No labels