How does golang see what methods and properties are under an object?

for example, I just started golang to import a third-party package, and then returned to generate an object. The object println says it is a map, but I can"t get out the key, under map, so I want to see what properties and methods are available under this map. I checked the source code, but I didn"t find it. I hereby ask for help

Dec.15,2021

type User struct {
    Name string
}

func (u *User) A() {
    fmt.Println("hello")
}
func (u *User) B(name string) {
    fmt.Printf("Shake hand with %s\n", name)
}

func TestReflect(t *testing.T) {
    u := &User{Name: "xxxx"}
    value := reflect.ValueOf(u)
    typ := value.Type()
    for i := 0; i < value.NumMethod(); iPP {
        fmt.Println(fmt.Sprintf("method[%d]%s and type is %v", i, typ.Method(i).Name, typ.Method(i).Type))
    }
}

use reflect to get what you want. Give it a try.
take a good look at the documentation.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb1dbd-238b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb1dbd-238b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?