Tuesday, June 16, 2020

installing Go And write Hello World on Linux Mint 19.3 Tricia

Video Tutorial -

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Go is a compiled, statically typed programming language developed by Google. Many modern applications such as Docker, Kubernetes, and Caddy are written in Go.

Offcial Website -https://golang.org/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment Setup-  : Linux Mint 19.3 Tricia ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------__________________________________________________________________________________________________________________

lsb_release -cd

apt update ; apt install -y build-essential net-tools curl git software-properties-common


wget -c https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local

export PATH=$PATH:/usr/local/go/bin

source ~/.profile

go version


mkdir -p go/src/hello && cd go/src/hello

nano hello.go


package main


import "fmt"


func main() {

    fmt.Printf("hello, world\n")

}

go build

./hello

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment