go-reflect Questions
1
I want to reflect the struct type and value recursively, but it fails. I don't know how to pass the sub struct recursively.
It error the following.
panic: reflect: NumField of non-struct type
go...
Handcart asked 28/12, 2015 at 11:54
2
Solved
check the Snippet below:
http://play.golang.org/p/xusdITxgT-
Why is this happening? Because one of my argument must be a slice address.
Maybe I did not made it clear for everyone.
collection.Fi...
Bowline asked 19/8, 2014 at 13:26
2
Solved
I am using reflect package to get the type of arbitrary array, but getting
prog.go:17: cannot use sample_array1 (type []int) as type []interface {} in function argument [process exited with non-...
Psilocybin asked 15/10, 2013 at 19:40
2
Solved
Been having one last issue with my code which involves the .Call function in the reflect package.
So I'm making a call such as this:
params := "some map[string][]string"
in := make([]reflect.Val...
Duleba asked 21/12, 2013 at 2:57
2
Solved
Can anyone tell me how to create a new instance of Type from a string? Reflect?
There are examples but they are for the older (pre Go 1 versions) of the language [:(]
Sherard asked 18/4, 2012 at 13:16
1
Solved
Basically if I have a slice or array of any arbitrary functions, how can I select only the ones that return int, or select only the ones that take ints?
I figured that I would need to use the refl...
Theft asked 17/9, 2012 at 15:22
3
I am new to type safe, and can't figure out how to do following
package main
func test(){
print("In Test")
}
func main(){
a := "test"
a()
}
Branscum asked 26/8, 2012 at 4:22
3
Solved
In Go, is there any way to compare two non-nil function pointers to test for equality? My standard of equality is pointer equality. If not, is there any particular reason why pointer equality is no...
Loathsome asked 10/3, 2012 at 1:42
1
Solved
type t1 struct { i int; s string }
var v1 reflect.Type = /* how to set to t1's reflect.Type? */
is it possible to get the reflect.Type of t1 without having to instantiate it?
is it possible to g...
Hippocrene asked 17/6, 2011 at 19:6
© 2022 - 2024 — McMap. All rights reserved.