How To Install golang-github-tcnksm-go-input-dev on Debian 10

Learn how to install golang-github-tcnksm-go-input-dev on Debian 10 with this tutorial. golang-github-tcnksm-go-input-dev is Go package for ideal tty prompt

Introduction

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

What is golang-github-tcnksm-go-input-dev

golang-github-tcnksm-go-input-dev is:

go-input is a Go package for reading user input in console.

Here is the some good points compared with other/similar packages. It can handle SIGINT (Ctrl+C) while reading input and returns error. It allows one to change IO interface as io.Writer and io.Reader so it’s easy to test of your go program with this package (This package is also well-tested!). It also supports raw mode input (reading input without prompting) for multiple platform (Darwin, Linux and Windows). Not only this it allows one to prompt complex input via Option struct.

There are three methods to install golang-github-tcnksm-go-input-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-tcnksm-go-input-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-tcnksm-go-input-dev using apt-get by running the following command:

sudo apt-get -y install golang-github-tcnksm-go-input-dev

Install golang-github-tcnksm-go-input-dev Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install golang-github-tcnksm-go-input-dev

Install golang-github-tcnksm-go-input-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-tcnksm-go-input-dev using aptitude by running the following command:

sudo aptitude -y install golang-github-tcnksm-go-input-dev

How To Uninstall golang-github-tcnksm-go-input-dev on Debian 10

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

sudo apt-get remove golang-github-tcnksm-go-input-dev

Uninstall golang-github-tcnksm-go-input-dev And Its Dependencies

To uninstall golang-github-tcnksm-go-input-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-tcnksm-go-input-dev

Remove golang-github-tcnksm-go-input-dev Configurations and Data

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

sudo apt-get -y purge golang-github-tcnksm-go-input-dev

Remove golang-github-tcnksm-go-input-dev configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge golang-github-tcnksm-go-input-dev

Dependencies

golang-github-tcnksm-go-input-dev have the following dependencies:

References

Summary

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