UÖUğur Özyılmazelinvigos.hashnode.dev·Sep 10, 2023 · 3 min readAlways use typed arguments for functions in GoConsider you have a function, that accepts two string arguments such as apiKey and apiSecret. Here is a pseudo function to address the problem: func fooClient(apiKey, apiSecret string) error { // do the implementation here... panic("not imple...00
UÖUğur Özyılmazelinvigos.hashnode.dev·Sep 10, 2023 · 1 min readInject values at build time in GoDo you know that, It is possible to inject values to variables at build on Golang? Let’s assume that you are building a command-line tool and you want to inject the latest build/commit hash to your application. Maybe you are building a rest API servi...00