How to Install and Uninstall golang-github-hashicorp-go-cleanhttp-dev Package on Ubuntu 20.10 (Groovy Gorilla)

Last updated: December 26,2024

1. Install "golang-github-hashicorp-go-cleanhttp-dev" package

In this section, we are going to explain the necessary steps to install golang-github-hashicorp-go-cleanhttp-dev on Ubuntu 20.10 (Groovy Gorilla)

$ sudo apt update $ sudo apt install golang-github-hashicorp-go-cleanhttp-dev

2. Uninstall "golang-github-hashicorp-go-cleanhttp-dev" package

Please follow the instructions below to uninstall golang-github-hashicorp-go-cleanhttp-dev on Ubuntu 20.10 (Groovy Gorilla):

$ sudo apt remove golang-github-hashicorp-go-cleanhttp-dev $ sudo apt autoclean && sudo apt autoremove

3. Information about the golang-github-hashicorp-go-cleanhttp-dev package on Ubuntu 20.10 (Groovy Gorilla)

Package: golang-github-hashicorp-go-cleanhttp-dev
Architecture: all
Version: 0.5.1-1
Priority: extra
Section: universe/devel
Source: golang-github-hashicorp-go-cleanhttp
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: Debian Go Packaging Team
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 39
Filename: pool/universe/g/golang-github-hashicorp-go-cleanhttp/golang-github-hashicorp-go-cleanhttp-dev_0.5.1-1_all.deb
Size: 10432
MD5sum: 2f77c3120879936aa26b35136f9cb7b4
SHA1: f1d90e214e04e62e170a3fe052b45f0791e14799
SHA256: 92c9ebe099256ab3e44f40a59df0c8af79397190671d2e48496f345874270bb9
SHA512: 76e0a66f09f3bb48ad7018b317d4a301e9056942807c786f0204e37a25feff42a63291928d0549458d9066ed1447bbc9a65bc8c3a7ece87d95ad0d5abc34ca50
Homepage: https://github.com/hashicorp/go-cleanhttp
Description-en: Functions for accessing "clean" Go http.Client values
The Go standard library contains a default http.Client called
http.DefaultClient. It is a common idiom in Go code to start with
http.DefaultClient and tweak it as necessary, and in fact, this is encouraged;
from the http package documentation:
.
The Client's Transport typically has internal state (cached TCP connections),
so Clients should be reused instead of created as needed. Clients are safe
for concurrent use by multiple goroutines.
.
Unfortunately, this is a shared value, and it is not uncommon for libraries to
assume that they are free to modify it at will. With enough dependencies, it
can be very easy to encounter strange problems and race conditions due to
manipulation of this shared value across libraries and goroutines (clients are
safe for concurrent use, but writing values to the client struct itself is not
protected).
.
Making things worse is the fact that a bare http.Client will use a default
http.Transport called http.DefaultTransport, which is another global value that
behaves the same way. So it is not simply enough to replace http.DefaultClient
with &http.Client{}.
.
This repository provides some simple functions to get a "clean" http.Client --
one that uses the same default values as the Go standard library, but returns a
client that does not share any state with other clients.
.
This package contains the source.
Description-md5: 666b58b21d02ffa210360802acbe29c5