Is it possible to create variable with type from string?
Example:
I have two types:
type FirstType struct {
...
}
type SecondType struct {
...
}
// also I have a string variable
var1 := "Second"
I want to create variable with type - String value + "Type":
var variable = []var1+"Type" // slice of "SecondType"
Expected result is like in this case:
var variable = []SecondType
Thanks!