- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for ExampleValue_FieldByName (0.24 sec)
-
src/reflect/example_test.go
lastName: "Doe", } s := reflect.ValueOf(u).FieldByIndex([]int{0, 1}) fmt.Println("embedded last name:", s) // Output: // embedded last name: Embedded Doe } func ExampleValue_FieldByName() { type user struct { firstName string lastName string } u := user{firstName: "John", lastName: "Doe"} s := reflect.ValueOf(u) fmt.Println("Name:", s.FieldByName("firstName"))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 19 20:04:36 UTC 2022 - 4.5K bytes - Viewed (0)