Here is a #golang challenge for you! πŸ€“
Without modifying my package named "puzzler", can you create, in the main function, a variable of (non-exported) type puzzler.config? Playground: https://go.dev/play/p/hSSRfbZbjKK
I'll post a solution tomorrow. πŸ˜‰
Go Playground - The Go Programming Language

@jub0bs found a solution using reflection!

Link: https://go.dev/play/p/KgUjXgbl0eU

I wonder if we can use the `WithTimeoutMs` without reflection to get the desired type. Would gladly take a look at your solution.

Go Playground - The Go Programming Language

@babariviere Nice! Reflection is indeed one possible approach. How about with generics only (no reflection)?

@jub0bs Ah got it!

So this is what you expected?

https://go.dev/play/p/VuJGqTLeSE9

Go Playground - The Go Programming Language

@babariviere Yes, well done; you don't even need to call f, though.

I'll talk about what this implies in a future post.

@jub0bs Now that you say it, it’s logic haha.

Will look into it!