How To Install golang-honnef-tools on Fedora 36

In this tutorial we learn how to install golang-honnef-tools in Fedora 36. golang-honnef-tools is Collection of static analysis tools for working with Go code

Introduction

In this tutorial we learn how to install golang-honnef-tools on Fedora 36.

What is golang-honnef-tools

honnef.co/go/tools/… is a collection of tools and libraries for working with Go code, including linters and static analysis, most prominently staticcheck.

We can use yum or dnf to install golang-honnef-tools on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install golang-honnef-tools.

Install golang-honnef-tools on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install golang-honnef-tools using dnf by running the following command:

sudo dnf -y install golang-honnef-tools

Install golang-honnef-tools on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install golang-honnef-tools using yum by running the following command:

sudo yum -y install golang-honnef-tools

How To Uninstall golang-honnef-tools on Fedora 36

To uninstall only the golang-honnef-tools package we can use the following command:

sudo dnf remove golang-honnef-tools

golang-honnef-tools Package Contents on Fedora 36

/usr/bin/keyify
/usr/bin/staticcheck
/usr/bin/structlayout
/usr/bin/structlayout-optimize
/usr/bin/structlayout-pretty
/usr/lib/.build-id
/usr/lib/.build-id/5f
/usr/lib/.build-id/5f/6658b7cd74879a46473e76ea281d532bf2cb3d
/usr/lib/.build-id/81
/usr/lib/.build-id/81/e616b9a9081c49babe99d1ee4ce8db6913d859
/usr/lib/.build-id/9f
/usr/lib/.build-id/9f/19326bebea0bf0635e718a00d4b547d0908b27
/usr/lib/.build-id/a3
/usr/lib/.build-id/a3/aea0559de09658fa19a15defaef84ef33f37ab
/usr/lib/.build-id/b6
/usr/lib/.build-id/b6/8e6fbf4fbd2a2f262f31c4b787ff9f3019730d
/usr/share/doc/golang-honnef-tools
/usr/share/doc/golang-honnef-tools/README.md
/usr/share/licenses/golang-honnef-tools
/usr/share/licenses/golang-honnef-tools/LICENSE

References

Summary

In this tutorial we learn how to install golang-honnef-tools on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).