Skip to content

Latest commit

 

History

History
59 lines (55 loc) · 2.1 KB

README.md

File metadata and controls

59 lines (55 loc) · 2.1 KB

Learning-GoLang

GoLang:

Go is a statically typed, compiled high-level programming language designed at Google by Robert Griesemer, Rob Pike, and Ken Thompson. It is syntactically similar to C, but with memory safety, garbage collection, structural typing, and CSP-style concurrency.

Setup:

For setup we need two thing:

Now Install GO Compiler after installation, checking if the go compiler is installed or not executing this command in CMD or terminal:

go version

Now Open VS Code and Hit Ctrl + Shift + X

There download the Go Extension

Running our first program

Step 1:

Create a file with go extension for example:

main.go

Step 2:

Then Open New Terminal in VS Code by Ctrl + Shift + `

Step 3:

Write this command to initialize Go mod

go mod init <folder name>

in my case it is:

go mod init Learning-GoLang

Step 4:

Now write your porgram and run it by:

go run <file name.go>

in my case:

go run main.go

Happy Coding