In Golang, the values in map, can they be types ? For example how do I create a map m[string]type such that it can be like this,
m["abc"] = int
m["def"] = string
m["ghi"] = structtype ( some structure of type structtype)
I need such map because, I have a function which has a string argument and according to that string argument the function creates a variable of a certain type and does some operations. So, if I have a map which maps a string to a type, the function can check that map using the string argument as the key to find out which type of variable it needs to create.