July 2017
Beginner to intermediate
358 pages
10h 54m
English
Static code analysis is a fast and efficient way to check for any problems in our source code automatically. In our example, we will run two different static code analysis tools. The first is megacheck by Dominik Honnef, which examines the code for common problems such as misuse of the standard library and concurrency issues.
The second is SafeSQL from the Stripe team. SafeSQL runs through our code and looks for uses of the SQL package. It then examines the ones looking for vulnerabilities such as incorrectly constructed queries, which may be open to SQL injection.
Lastly, we will be checking our code, including the tests for unhandled errors. For example, you have the following function:
func DoSomething() (*Object, ...
Read now
Unlock full access