Go Programming Language Introduction and Installation

Go Programming Language Introduction

Go was created by Robert Griesemer, Rob Pike, and Ken Thompson at Google in 2007. Go is an opensource programming language and can be used to make simple, reliable and efficient software easily.

How to install Go in fedora 26 ?

$  sudo dnf install golang
Output:
Failed to synchronize cache for repo 'mstuchli-Python3.5', disabling.
Last metadata expiration check: 0:15:32 ago on Tue Jul 24 16:31:20 2018.
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                         	Arch                                        	Version                                            	Repository                                    	Size
===================================================================================================================================================================================================================
Installing:
 golang                                          	x86_64                                      	1.6.4-3.fc24                                       	updates                                      	1.1 M
 golang-bin                                      	x86_64                                      	1.6.4-3.fc24                                       	updates                                       	43 M
 golang-src                                      	noarch                                      	1.6.4-3.fc24                                       	updates                                      	3.9 M

Transaction Summary
===================================================================================================================================================================================================================
Install  3 Packages

Total download size: 48 M
Installed size: 250 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): golang-1.6.4-3.fc24.x86_64.rpm                                                                                                                                          	103 kB/s | 1.1 MB 	00:11    
(2/3): golang-src-1.6.4-3.fc24.noarch.rpm                                                                                                                                      	114 kB/s | 3.9 MB 	00:35    
(3/3): golang-bin-1.6.4-3.fc24.x86_64.rpm                                                                                                                                      	167 kB/s |  43 MB 	04:23    
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                          	185 kB/s |  48 MB 	04:25	 
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Installing  : golang-src-1.6.4-3.fc24.noarch                                                                                                                                                             	1/3
  Installing  : golang-bin-1.6.4-3.fc24.x86_64                                                                                                                                                             	2/3
  Installing  : golang-1.6.4-3.fc24.x86_64                                                                                                                                                                 	3/3
  Verifying   : golang-1.6.4-3.fc24.x86_64                                                                                                                                                                 	1/3
  Verifying   : golang-bin-1.6.4-3.fc24.x86_64                                                                                                                                                             	2/3
  Verifying   : golang-src-1.6.4-3.fc24.noarch                                                                                                                                                             	3/3

Installed:
  golang.x86_64 1.6.4-3.fc24                                     	golang-bin.x86_64 1.6.4-3.fc24                                     	golang-src.noarch 1.6.4-3.fc24                                   	 

Complete!

How to uninstall Go in fedora 26 ?

$ sudo yum remove golang
Output:
Redirecting to '/usr/bin/dnf remove golang' (see 'man yum2dnf')

Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                         	Arch                                        	Version                                           	Repository                                     	Size
===================================================================================================================================================================================================================
Removing:
 golang                                          	x86_64                                      	1.6.4-3.fc24                                      	@updates                                       	11 M
 golang-bin                                      	x86_64                                      	1.6.4-3.fc24                                      	@updates                                      	220 M
 golang-src                                      	noarch                                      	1.6.4-3.fc24                                      	@updates                                       	18 M

Transaction Summary
===================================================================================================================================================================================================================
Remove  3 Packages

Installed size: 250 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Erasing 	: golang-bin-1.6.4-3.fc24.x86_64                                                                                                                                                             	1/3
warning: file /usr/bin/gofmt: remove failed: No such file or directory
warning: file /usr/bin/go: remove failed: No such file or directory
  Erasing 	: golang-1.6.4-3.fc24.x86_64                                                                                                                                                                 	2/3
  Erasing 	: golang-src-1.6.4-3.fc24.noarch                                                                                                                                                             	3/3
  Verifying   : golang-1.6.4-3.fc24.x86_64                                                                                                                                                                 	1/3
  Verifying   : golang-bin-1.6.4-3.fc24.x86_64                                                                                                                                                             	2/3
  Verifying   : golang-src-1.6.4-3.fc24.noarch                                                                                                                                                             	3/3

Removed:
  golang.x86_64 1.6.4-3.fc24                                     	golang-bin.x86_64 1.6.4-3.fc24                                     	golang-src.noarch 1.6.4-3.fc24                                   	 

Complete!