Fix part of the lint errors

Introduced the go lint in this project. This patch is the first step to fix the legacy lint issues.