How to Install and Uninstall golang-github-mitchellh-mapstructure-dev Package on Ubuntu 21.04 (Hirsute Hippo)

Last updated: May 12,2024

1. Install "golang-github-mitchellh-mapstructure-dev" package

This guide let you learn how to install golang-github-mitchellh-mapstructure-dev on Ubuntu 21.04 (Hirsute Hippo)

$ sudo apt update $ sudo apt install golang-github-mitchellh-mapstructure-dev

2. Uninstall "golang-github-mitchellh-mapstructure-dev" package

Learn how to uninstall golang-github-mitchellh-mapstructure-dev on Ubuntu 21.04 (Hirsute Hippo):

$ sudo apt remove golang-github-mitchellh-mapstructure-dev $ sudo apt autoclean && sudo apt autoremove

3. Information about the golang-github-mitchellh-mapstructure-dev package on Ubuntu 21.04 (Hirsute Hippo)

Package: golang-github-mitchellh-mapstructure-dev
Architecture: all
Version: 1.3.3-1
Priority: extra
Section: universe/devel
Source: golang-github-mitchellh-mapstructure
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: Debian Go Packaging Team
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 144
Filename: pool/universe/g/golang-github-mitchellh-mapstructure/golang-github-mitchellh-mapstructure-dev_1.3.3-1_all.deb
Size: 25056
MD5sum: f53dcf7e2d521460dba64efc5140ab48
SHA1: 38d01a0c1f649d1f226d3ac69debaaca4e84c6fe
SHA256: 20290fa3f8428901bcef3c29e2e8d2f5c9f932e2ec4f8ca6dcc7e4d322a56af8
SHA512: 79b1b590fef33c63a7064bc773b30d265f2d3c3ac248ee94d8b328bf640be78a7734dd86ba7263c32f04571cee164e1e3b7a0e025c58f3a4512d1e1a8ccf074b
Homepage: https://github.com/mitchellh/mapstructure
Description-en: library for decoding generic map values into native Go structures
mapstructure is a Go library for decoding generic map values to structures and
vice versa, while providing helpful error handling.
.
This library is most useful when decoding values from some data stream (JSON,
Gob, etc.) where you don't quite know the structure of the underlying data
until you read a part of it. You can therefore read a map[string]interface{}
and use this library to decode it into the proper underlying native Go
structure.
.
Go offers fantastic standard libraries for decoding formats such as JSON. The
standard method is to have a struct pre-created, and populate that struct from
the bytes of the encoded format. This is great, but the problem is if you have
configuration or an encoding that changes slightly depending on specific
fields.
.
Perhaps we can't populate a specific structure without first reading the "type"
field from the JSON. We could always do two passes over the decoding of the
JSON (reading the "type" first, and the rest later). However, it is much
simpler to just decode this into a map[string]interface{} structure, read the
"type" key, then use something like this library to decode it into the proper
structure.
Description-md5: 795ba6f76c1759ba503b27c28cac9396