How To Install Go (Golang) On Fedora 30

Cpanel/Whm License $3/mo Plesk License $10/mo Cloudlinux License $5/mo

(: July 10, 2019)

This guide will walk you through the installation of Go (Golang) on Fedora 30. Go is a programming language designed to ease the Development of reliable, simple, and efficient applications. It is an original product of Google Engineering.

In this guide, we will install Go 1.12 on Fedora 30 from official upstream repositories. To ensure the repositories are up-to-date, update the system.

sudo dnf -y update

Once you confirm it is up, install Go on Fedora 30 using the commands below.

.td_uid_2_5d90988cf2d36_rand.td-a-rec-img{text-align:left}.td_uid_2_5d90988cf2d36_rand.td-a-rec-img img{margin:0 auto 0 0}
sudo dnf -y install go

Test Go installation on Fedora 30

Now that we have Go installed on Fedora 30, let’s test to ensure it is working.

Start by creating your workspace directory.

mkdir $HOME/go

Create a directory inside it to host a test Go application.

cd $HOME/go
mkdir -p src/helloworld && cd src/helloworld

Create a file named helloworld.go that looks like:

package main
import "fmt"
func main() {
	fmt.Printf("hello, worldn")
}

Build the application with go tool

cd $HOME/go/src/helloworld
go build

This will generate a new file called helloworld .

$ ls
helloworld helloworld.go

Execute the file by running.

$ ./helloworld 
hello, world

To install the binary into your workspace’s bin directory, use:

$ go install
$ ls ~/go/bin/
helloworld

To remove it use:

go clean -i

You can add your Go binary directory to $PATH.

$ vim ~/.bashrc 
export PATH="$PATH:~/go/bin/"
export GOPATH="~/go"

You have installed Go on Fedora 30. Enjoy developing Go applications on your Fedora Workstation.

Similar:

Install and Configure DBeaver on Fedora

How To Install Podman on Fedora

How To Install Polybar Status bar on Fedora

How To Install Kodi Media Server on Fedora

.td_uid_4_5d90988cf2f25_rand.td-a-rec-img{text-align:left}.td_uid_4_5d90988cf2f25_rand.td-a-rec-img img{margin:0 auto 0 0}

Related posts

How Regulators Become Blockchain Innovators

SXI ADMIN

US State Seeks to Confiscate $24 Million in Dark Web Bitcoin

SXI ADMIN

LocalBitcoins Trader ‘Bitcoin Maven’ Sentenced to Year in Prison

SXI ADMIN

Red Hat / CentOS Setup Routing Metric For Network Device

SXI ADMIN

US Should Encourage Blockchain Investments, Says Former Defense Official

SXI ADMIN

Crypto Cries Foul In Wake of Tether’s Dollar Token Report

SXI ADMIN

Philippines Startups Aim to Fulfil Bitcoin’s Remittance Promise

SXI ADMIN

Sidechains White Paper Imagines New Future for Digital Currency Development

SXI ADMIN

NY Law Panel: Bitcoin Won’t Get Banking Without Compliance

SXI ADMIN

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More