Benchmarking package initialization
Go program execution doesn’t start at func main. First is a bit of bootstrapping. Then the runtime gets initialized. Then, package by package, the program initializes global variables and runs init functions. Then it’s time for main.
Usually, the startup time for a Go program is negligible, and irrelevant compared to its steady state performance.
For short-lived programs, though, startup performance can matter a lot. This is particularly true if the program is a low level tool that is executed repeatedly by other programs. There has also been recent interest in optimizing the startup impact of the standard library.
Don't Panic