George Haidar @disintegrator.dev · May 15

Since we're not going to get keyword arguments in @golang.org in the foreseeable, I've become very invested in using type definitions to "brand" common types in our codebase e.g. string, int, uuid.UUID and so on...

2 likes 1 replies

?

Replies

Ernesto Jiménez · May 16

💯 That pattern is quite common in other languages too. Especially if you are going to use those types across your domain. I also use: * Struct as input: useful if you can simply transform a struct into the input struct rather than manually wire all arguments * Functional option parameters