Setup GO Language in Linux and test run


Bellow is the process for setting up GO Language in centos 7 or ubuntu 18.04

Download package

$ wget https://dl.google.com/go/go1.14.linux-amd64.tar.gz

extract binary

$ tar -C /usr/local -xzf go1.14.linux-amd64.tar.gz

setup path

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

set permanent path in user profile

$ vim ~/.bash_profile

create environment directory

$ mkdir ~/go

create a test programm

$ mkdir ~/go/src/hello -p

$ cd go/src/hello/

$ vim hello.go
--
package main

import "fmt"

func main() {
    fmt.Printf("Hello, World\n")
}
--

$ go build
 $ ./hello


Comments

Popular posts from this blog

using libguestfs virt-customize tool to modify qcow2 image and reset root password.

Running cockpit behind nginx reverse proxy with nginx ssl and cockpit non ssl

setting up openshift alert manager mail alerting based on critical and warning