golint command not found

In this troubleshooting guide we learn how to fix golint command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

golint: command not found

or when using sudo you get the following error message

sudo: golint: command not found

Solutions to golint: command not found

How To Fix golint: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu golint is provided by golint package.

golint is:

Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes.

Golint differs from govet. Govet is concerned with correctness, whereas golint is concerned with coding style. Golint is in use at Google, and it seeks to match the accepted style of the open source Go project.

To fix this problem, we can install more using the command below.

sudo apt-get -y install golint

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install golint.

sudo apt -y install golint

Or if you have aptitude installed you can use the following command.

sudo aptitude install golint

Summary

In this tutorial we learn how to fix golint command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.