You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"gorm.io/gorm"
|
|
"reflect"
|
|
)
|
|
|
|
type Person struct {
|
|
name string
|
|
db *gorm.DB
|
|
}
|
|
|
|
func main() {
|
|
var person Person
|
|
t1 := reflect.TypeOf(&person).Elem()
|
|
t2 := reflect.TypeOf(&person).Elem()
|
|
b1 := t1 == t2
|
|
fmt.Println(t1)
|
|
fmt.Println(t2)
|
|
fmt.Println(b1)
|
|
}
|
|
|