I have two variables:
somethingA := 123
somethingB := 456
This two variables are filled though the system and lets presume that you have third variable:
type := "A"
With third variable you want to call somethingA but not like following:
if type == "A" {
return somethingA
}else{
return somethingB
}
but something like:
return something{type}
Is something like this possible in go?
Thank you