When you have a very simple application it’s not so important to test every edge case but in a project, in the very complex domain, the priority of it will increase. The more high-quality the tests, the more high-quality the code. Mutational tests will help you with making sure you did not miss some a variant of the flow in your code. How it works Mutational testing is a test which runs other test several times but with a bit changed production code in every iteration.
I’ll tell you a story of Igor. Igor is a web developer. He’s a young man with a girlfriend and some ambitious plan in the future. Igor sit at his desk because he has some work to do. In front of him is a PC. He turns it on and sees some system updates. 30 minutes have passed, and he can see his desktop with a beautiful wallpaper. Funny cats always make his day better.
public:: true When the Go compiler cannot tell for sure that the variable under the interface won’t be used longer than the caller function lives, it will move the variable to the heap instead of the stack. When we run our code with a parameter -gcflags="-m" we’ll get (in the stdout) the heap escape analysis. The output will tell us what kind of compile optimisations are done during building a package.