Skip to content

Latest commit

 

History

History
49 lines (27 loc) · 1.93 KB

Readme.md

File metadata and controls

49 lines (27 loc) · 1.93 KB

Golang

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

I have been learning Golang and using certain basic programming features to understand it. Starting from the most primitve aspects of understanding a language.

Contents

Installation

Windows

  • Official golang source download a zip archive that requires you to set some environment variables and an MSI installer that configures your installation automatically.

  • MSI installer Open the MSI file and follow the prompts to install the Go tools. By default, the installer puts the Go distribution in c:\Go.

The installer should put the c:\Go\bin directory in your PATH environment variable. You may need to restart any open command prompts for the change to take effect.

  • Zip archive Download the zip file and extract it into the directory of your choice (we suggest c:\Go).

Add the bin subdirectory of your Go root (for example, c:\Go\bin) to your PATH environment variable.

macOS package installer

Download the package file, open it, and follow the prompts to install the Go tools. The package installs the Go distribution to /usr/local/go.

The package should put the /usr/local/go/bin directory in your PATH environment variable. You may need to restart any open Terminal sessions for the change to take effect.

Run go

For your first program save your go file as

File-->Save as-->Name--> "abc.go" Save as--> .txt

Make sure to use the ""(double inverted commas)

Navigate to the saved directory where your source code file is saved.

Use go run abc.go to run the program