How long did the function run in Go
Go (Golang) is fast. This phrase is everywhere. It’s always interesting how long it takes a function to finish its operation. Here is an example of a helper function, that could be used to check and log the timing: func TimeTrack(start time.Time, name string) { elapsed := time.Since(start) log.Printf("%s took %s", name, elapsed) } It takes a start time and the name (could be a function name) as parameters. Use it with the “defer” statement inside the functions:...