What is the Go Programming language?

Go is a programming language designed by Google engineers Robert Griesemer, Rob Pike, and Ken Thompson. Go is a statically typed, compiled language in the tradition of C, with the added benefits of memory safety, garbage collection, structural typing, and CSP style concurrency. The compiler, tools, and source code are all free and open source.

How to install in Android?

Before we continue, install these two apps on your Android phone:

Open Termux app and type following commands:

$ pkg update
$ pkg install vim git golang 

This will take about 600mb of space. The process shows exactly what packages are downloaded and installed.

$ vim filename.go

Hello world program in go :

// My first Program
package main

import "fmt"

func main() {
    fmt.Println("Hello, World")

To run go code:

$ go run hello.go
Hello, World

To compile:

 $ go build filename.go

To Run just do:

$ ./filename 

That’s all there is to it, now you can use the power of go on your phone. Install packages just like on the desktop:

go get github.com/<name>/<pkg name>

Hope you enjoy this.

Leave a Reply