How To Install golang-github-jinzhu-now-dev on Ubuntu 18.04

In this tutorial we learn how to install golang-github-jinzhu-now-dev on Ubuntu 18.04. golang-github-jinzhu-now-dev is time toolkit for golang

Introduction

In this tutorial we learn how to install golang-github-jinzhu-now-dev on Ubuntu 18.04.

What is golang-github-jinzhu-now-dev

golang-github-jinzhu-now-dev is:

Package now is a time toolkit for golang.

time.Now() // 2013-11-18 17:51:49.123456789 Mon

BeginningOfMinute() // 2013-11-18 17:51:00 Mon BeginningOfHour() // 2013-11-18 17:00:00 Mon BeginningOfDay() // 2013-11-18 00:00:00 Mon BeginningOfWeek() // 2013-11-17 00:00:00 Sun

FirstDayMonday = true // Set Monday as first day BeginningOfWeek() // 2013-11-18 00:00:00 Mon BeginningOfMonth() // 2013-11-01 00:00:00 Fri BeginningOfQuarter() // 2013-10-01 00:00:00 Tue BeginningOfYear() // 2013-01-01 00:00:00 Tue

EndOfMinute() // 2013-11-18 17:51:59.999999999 Mon EndOfHour() // 2013-11-18 17:59:59.999999999 Mon EndOfDay() // 2013-11-18 23:59:59.999999999 Mon EndOfWeek() // 2013-11-23 23:59:59.999999999 Sat

FirstDayMonday = true // Set Monday as first day EndOfWeek() // 2013-11-24 23:59:59.999999999 Sun EndOfMonth() // 2013-11-30 23:59:59.999999999 Sat EndOfQuarter() // 2013-12-31 23:59:59.999999999 Tue EndOfYear() // 2013-12-31 23:59:59.999999999 Tue

// Use another time t := time.Date(2013, 02, 18, 17, 51, 49, 123456789, time.UTC) New(t).EndOfMonth() // 2013-02-28 23:59:59.999999999 Thu

Monday() // 2013-11-18 00:00:00 Mon Sunday() // 2013-11-24 00:00:00 Sun EndOfSunday() // 2013-11-24 23:59:59.999999999 Sun

This package contains the source.

There are three methods to install golang-github-jinzhu-now-dev on Ubuntu 18.04. 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-jinzhu-now-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-jinzhu-now-dev using apt-get by running the following command:

sudo apt-get -y install golang-github-jinzhu-now-dev

Install golang-github-jinzhu-now-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install golang-github-jinzhu-now-dev using apt by running the following command:

sudo apt -y install golang-github-jinzhu-now-dev

Install golang-github-jinzhu-now-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 Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install golang-github-jinzhu-now-dev

How To Uninstall golang-github-jinzhu-now-dev on Ubuntu 18.04

To uninstall only the golang-github-jinzhu-now-dev package we can use the following command:

sudo apt-get remove golang-github-jinzhu-now-dev

Uninstall golang-github-jinzhu-now-dev And Its Dependencies

To uninstall golang-github-jinzhu-now-dev and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove golang-github-jinzhu-now-dev

Remove golang-github-jinzhu-now-dev Configurations and Data

To remove golang-github-jinzhu-now-dev configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge golang-github-jinzhu-now-dev

Remove golang-github-jinzhu-now-dev configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge golang-github-jinzhu-now-dev

References

Summary

In this tutorial we learn how to install golang-github-jinzhu-now-dev package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.