Always 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...3 min read·vigos.hashnode.devSep 10, 2023
Inject 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...1 min read·vigos.hashnode.devSep 10, 2023