How to Install Golang on Your Android

Golang is a simple, efficient and powerful language it's good for web and API developments at the moment but lots of developments are coming.

golang android

If you beginner want to learn golang but you don't have any pc for learn golang don't worry you have powerful device that is your android smartphone. Smartphone is best device for programming for learning purpose so now we see how to install golang on android.

In this tutorial post I use tool is termux. Termux is a bash style android app it's very featured android bash type app.

Introduction

First install termux in playstore

https://play.google.com/store/apps/details?id=com.termux

Then open the app type

pkg install golang

it need 500+MB data for download the golang

Once download and installation is finished then type

go version

You get the latest version of golang installed on your android

Next type

pkg install vim

Vim is a open source editor for programming its need 26MB data for download. Installation is finished then type on your terminal

Now you need to create a golang program so follow the below steps

vim program.go

click i key then type the code


package main

import "fmt"

func main() {

fmt.Println("hello world")

}

click to save the file esc key and type : wq

Now you compile your golang program. Type the follow commands


go build program.go

./program

hello world

Congrats you created your first golang program.

If you like this post please follow our blog and have any doubts please comment below this post.


Are you new for hive create your own hive account for free signup here create hive account

H2
H3
H4
3 columns
2 columns
1 column
4 Comments
Ecency