This reminds me of the "functional options" approach: https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis
Of course, the difference being Dave is talking about configuring a struct type and you're talking about configuring a func type. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/C0LZEQ3GT054.33TKZBAD29X1Y%40jupiter.local.