How To Install golang-github-google-go-cmp-dev on Debian 10

Learn how to install golang-github-google-go-cmp-dev on Debian 10 with this tutorial. golang-github-google-go-cmp-dev is Package for comparing Go values in tests

Introduction

In this tutorial we learn how to install golang-github-google-go-cmp-dev on Debian 10.

What is golang-github-google-go-cmp-dev

golang-github-google-go-cmp-dev is:

This package is intended to be a more powerful and safer alternative to reflect.DeepEqual for comparing whether two values are semantically equal.

The primary features of cmp are:

  • When the default behavior of equality does not suit the needs of the test, custom equality functions can override the equality operation. For example, an equality function may report floats as equal so long as they are within some tolerance of each other.
  • Types that have an Equal method may use that method to determine equality. This allows package authors to determine the equality operation for the types that they define.
  • If no custom equality functions are used and no Equal method is defined, equality is determined by recursively comparing the primitive kinds on both values, much like reflect.DeepEqual. Unlike reflect.DeepEqual, unexported fields are not compared by default; they result in panics unless suppressed by using an Ignore option (see cmpopts.IgnoreUnexported) or explicitly compared using the AllowUnexported option.

See the GoDoc documentation (https://godoc.org/github.com/google/go-cmp/cmp) for more information.

There are three methods to install golang-github-google-go-cmp-dev on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install golang-github-google-go-cmp-dev Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install golang-github-google-go-cmp-dev using apt-get by running the following command:

sudo apt-get -y install golang-github-google-go-cmp-dev

Install golang-github-google-go-cmp-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install golang-github-google-go-cmp-dev using apt by running the following command:

sudo apt -y install golang-github-google-go-cmp-dev

Install golang-github-google-go-cmp-dev Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install golang-github-google-go-cmp-dev using aptitude by running the following command:

sudo aptitude -y install golang-github-google-go-cmp-dev

How To Uninstall golang-github-google-go-cmp-dev on Debian 10

To uninstall only the golang-github-google-go-cmp-dev package we can use the following command:

sudo apt-get remove golang-github-google-go-cmp-dev

Uninstall golang-github-google-go-cmp-dev And Its Dependencies

To uninstall golang-github-google-go-cmp-dev and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove golang-github-google-go-cmp-dev

Remove golang-github-google-go-cmp-dev Configurations and Data

To remove golang-github-google-go-cmp-dev configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge golang-github-google-go-cmp-dev

Remove golang-github-google-go-cmp-dev configuration, data, and all of its dependencies

We can use the following command to remove golang-github-google-go-cmp-dev configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge golang-github-google-go-cmp-dev

Dependencies

golang-github-google-go-cmp-dev have the following dependencies:

References

Summary

In this tutorial we learn how to install golang-github-google-go-cmp-dev package on Debian 10 using different package management tools: apt, apt-get and aptitude.