Original post

I want a switch statement based on a certain named params that execute an arbitrary function. Preferably using {} pattern so that it is easier for users, instead of regex patterns.

Basically what an http router does but not for handling http requests.

submitted by /u/pinpinbo
[link] [comments]