Defer in Golang

The defer keyword is found in many modern programming languages, and Go’s defer executes the passed-in function before the current function or method returns. It is often used to close file descriptors, close database connections, and unlock resources. ...

October 17, 2020 · vonhyou

A better way to implement getMax() in Golang

In previous assignment, I was asked to implement a function which can pick the biggest number in a slice. By learning on Coursera, I found a better way to do this. ...

October 15, 2020 · vonhyou