Python do Golang
# Check out https://github.com/google/grumpy (Grumpy is a Python to Go source code transcompiler )
CompSciGeek
# Check out https://github.com/google/grumpy (Grumpy is a Python to Go source code transcompiler )
def func1():
...
def func2():
...
funcmap = {1 : func1, 2 : func2}
def somefunc(a):
funcmap[a]() #Ugly! But it works.