IMHO I've wanted a switch expression, rather than a switch statement for
a while.
value := switch test {
case true => "red"
case false => "blue"
}
or
value := switch item.(type) {
case int => item
case string => strconv.Atoi(item)
case time.Time => {
... something more involved .
I've got a program that is trying to implement functions on "subclasses",
where the parent can check to see if the interface is implemented. For
perspective, it's really dealing with REST URL generation based on if
methods exist.
What I'm running into is that based on the following pattern, bot