SlideShare a Scribd company logo

Introduction to go lang

Introduction to GoLang by Amal Mohan N. This presentation is an introduction to GoLang - it's history, features, syntax, importance etc. concurrency, go-routines, golang, google, gopher, introduction, programming

1 of 40
Download to read offline
Introduction to GoLang
BY AMAL MOHAN N
Discussion Points
● History of Go.
● What is Go?
● What you’ll see in Go.
● What will you not see in Go.
● Why Go?
● Features
● Important Points.
● Who all are using Go
● Go installation
● Go Tools.
● Go structure.
● Types, Variables and Statements
● FrameWorks.
● Go Scope
● Go Docs
● Drawbacks
Founders of Go.
Ken Thompson Rob Pike Robert Griesemer
Kenneth Lane Thompson is an
American pioneer of computer
science.Thompson worked at Bell
Labs for most of his career where
he designed and implemented the
original Unix operating system.
A Swiss computer scientist. He is best
known for his work on the Go. Prior to
Go, he worked on Google's V8
JavaScript engine, the Sawzall
language, the Java HotSpot virtual
machine, and the Strongtalk system.
Robert "Rob" Pike is a Canadian
programmer and author. He is best
known for his work on the Go
programming language and at Bell
Labs, where he was a member of
the Unix team.
History of Go.
2021
1.17
What is Go?
● Go is Open-Source General-Purpose programming language
developed by Google.
● Solution to “BIG PROBLEMS” at Google.
What you’ll see in Go.
● Compiled
● Garbage Collection
● Simple Syntax
● Great standard library
● Cross Platform
● Object Oriented (no Inheritance)
● Statically typed
● Extensive use of pointers
● Extensive use of Structures
● Extensive use of Interfaces
● Extensive use of If statements
● Extensive use of for loops
● Multiple returns

Recommended

Go Programming language, golang
Go Programming language, golangGo Programming language, golang
Go Programming language, golangBasil N G
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageAniruddha Chakrabarti
 
Go language presentation
Go language presentationGo language presentation
Go language presentationparamisoft
 
The Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventureThe Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventuremylittleadventure
 
Introduction to GoLang
Introduction to GoLangIntroduction to GoLang
Introduction to GoLangNVISIA
 

More Related Content

What's hot

Golang (Go Programming Language)
Golang (Go Programming Language)Golang (Go Programming Language)
Golang (Go Programming Language)ShubhamMishra485
 
Coding with golang
Coding with golangCoding with golang
Coding with golangHannahMoss14
 
Introduction to Go programming language
Introduction to Go programming languageIntroduction to Go programming language
Introduction to Go programming languageSlawomir Dorzak
 
Why you should care about Go (Golang)
Why you should care about Go (Golang)Why you should care about Go (Golang)
Why you should care about Go (Golang)Aaron Schlesinger
 
Golang 101
Golang 101Golang 101
Golang 101宇 傅
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)Ishin Vin
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golangBo-Yi Wu
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by GoogleUttam Gandhi
 
Golang and Eco-System Introduction / Overview
Golang and Eco-System Introduction / OverviewGolang and Eco-System Introduction / Overview
Golang and Eco-System Introduction / OverviewMarkus Schneider
 
Golang getting started
Golang getting startedGolang getting started
Golang getting startedHarshad Patil
 
Goroutines and Channels in practice
Goroutines and Channels in practiceGoroutines and Channels in practice
Goroutines and Channels in practiceGuilherme Garnier
 
Introduction to Go language
Introduction to Go languageIntroduction to Go language
Introduction to Go languageTzar Umang
 
GO programming language
GO programming languageGO programming language
GO programming languagetung vu
 

What's hot (20)

Go Language presentation
Go Language presentationGo Language presentation
Go Language presentation
 
Golang (Go Programming Language)
Golang (Go Programming Language)Golang (Go Programming Language)
Golang (Go Programming Language)
 
Golang
GolangGolang
Golang
 
Go Lang Tutorial
Go Lang TutorialGo Lang Tutorial
Go Lang Tutorial
 
Coding with golang
Coding with golangCoding with golang
Coding with golang
 
Introduction to Go programming language
Introduction to Go programming languageIntroduction to Go programming language
Introduction to Go programming language
 
Why you should care about Go (Golang)
Why you should care about Go (Golang)Why you should care about Go (Golang)
Why you should care about Go (Golang)
 
Golang 101
Golang 101Golang 101
Golang 101
 
GoLang Introduction
GoLang IntroductionGoLang Introduction
GoLang Introduction
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
 
Golang workshop
Golang workshopGolang workshop
Golang workshop
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by Google
 
Golang and Eco-System Introduction / Overview
Golang and Eco-System Introduction / OverviewGolang and Eco-System Introduction / Overview
Golang and Eco-System Introduction / Overview
 
Golang getting started
Golang getting startedGolang getting started
Golang getting started
 
Goroutines and Channels in practice
Goroutines and Channels in practiceGoroutines and Channels in practice
Goroutines and Channels in practice
 
Concurrency With Go
Concurrency With GoConcurrency With Go
Concurrency With Go
 
Introduction to Go language
Introduction to Go languageIntroduction to Go language
Introduction to Go language
 
GO programming language
GO programming languageGO programming language
GO programming language
 
Memory in go
Memory in goMemory in go
Memory in go
 

Similar to Introduction to go lang

Introduction to Go
Introduction to GoIntroduction to Go
Introduction to GoSimon Hewitt
 
Advantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksAdvantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksKaty Slemon
 
Scaling applications with go
Scaling applications with goScaling applications with go
Scaling applications with goVimlesh Sharma
 
Golang : A Hype or the Future?
Golang : A Hype or the Future?Golang : A Hype or the Future?
Golang : A Hype or the Future?Mindfire LLC
 
Golang, Future of Programming Language.
Golang, Future of Programming Language.Golang, Future of Programming Language.
Golang, Future of Programming Language.Sunil Yadav
 
welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?sangam biradar
 
Hire golang developers and make the shift to brighter business future (build ...
Hire golang developers and make the shift to brighter business future (build ...Hire golang developers and make the shift to brighter business future (build ...
Hire golang developers and make the shift to brighter business future (build ...Katy Slemon
 
Go Within Cloud Foundry
Go Within Cloud FoundryGo Within Cloud Foundry
Go Within Cloud FoundryPlatform CF
 
Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction Ganesh Samarthyam
 
A First Look at Google's Go Programming Language
A First Look at Google's Go Programming LanguageA First Look at Google's Go Programming Language
A First Look at Google's Go Programming LanguageGanesh Samarthyam
 
NodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparisonNodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparisonDevathon
 
Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016Codemotion
 
Let's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming LanguageLet's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming LanguageGanesh Samarthyam
 

Similar to Introduction to go lang (20)

Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
Advantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksAdvantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworks
 
Scaling applications with go
Scaling applications with goScaling applications with go
Scaling applications with go
 
Golang : A Hype or the Future?
Golang : A Hype or the Future?Golang : A Hype or the Future?
Golang : A Hype or the Future?
 
Golang, Future of Programming Language.
Golang, Future of Programming Language.Golang, Future of Programming Language.
Golang, Future of Programming Language.
 
Features of go
Features of goFeatures of go
Features of go
 
An Introduction to Go
An Introduction to GoAn Introduction to Go
An Introduction to Go
 
welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?
 
Hire golang developers and make the shift to brighter business future (build ...
Hire golang developers and make the shift to brighter business future (build ...Hire golang developers and make the shift to brighter business future (build ...
Hire golang developers and make the shift to brighter business future (build ...
 
Beginning development in go
Beginning development in goBeginning development in go
Beginning development in go
 
Why Go Lang?
Why Go Lang?Why Go Lang?
Why Go Lang?
 
Go Within Cloud Foundry
Go Within Cloud FoundryGo Within Cloud Foundry
Go Within Cloud Foundry
 
Go programming language
Go programming languageGo programming language
Go programming language
 
Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction
 
A First Look at Google's Go Programming Language
A First Look at Google's Go Programming LanguageA First Look at Google's Go Programming Language
A First Look at Google's Go Programming Language
 
Go fundamentals
Go fundamentalsGo fundamentals
Go fundamentals
 
NodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparisonNodeJS vs Golang - A detailed comparison
NodeJS vs Golang - A detailed comparison
 
Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016
 
Golang
GolangGolang
Golang
 
Let's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming LanguageLet's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming Language
 

Recently uploaded

P1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetP1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetMatthewTHawley
 
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...emili denli
 
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ..."Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...ISPMAIndia
 
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이ssuser82c38d
 
LLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flowLLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flowNaoki (Neo) SATO
 
maximum subarray ppt for killing camp students
maximum subarray ppt for killing camp studentsmaximum subarray ppt for killing camp students
maximum subarray ppt for killing camp studentsssuser82c38d
 
Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Asher Sterkin
 
SPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementSPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementISPMAIndia
 
Getting Started with Trello for Beginners.pptx
Getting Started with Trello for Beginners.pptxGetting Started with Trello for Beginners.pptx
Getting Started with Trello for Beginners.pptxmavinoikein
 
AI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriAI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriISPMAIndia
 
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)GDSCNiT
 
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdfAUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdfAutokey
 
The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!ISPMAIndia
 
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...ISPMAIndia
 
No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!Anthony Dahanne
 
killingcamp longest common subsequence.pdf
killingcamp longest common subsequence.pdfkillingcamp longest common subsequence.pdf
killingcamp longest common subsequence.pdfssuser82c38d
 
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A..."Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...ISPMAIndia
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkTimothy Spann
 
Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Jeffrey Haguewood
 

Recently uploaded (20)

P1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetP1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 Smartsheet
 
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
 
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ..."Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
 
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
 
LLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flowLLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flow
 
maximum subarray ppt for killing camp students
maximum subarray ppt for killing camp studentsmaximum subarray ppt for killing camp students
maximum subarray ppt for killing camp students
 
Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024
 
eLearning Content Development Company Code and Pixels.pdf
eLearning Content Development Company Code and Pixels.pdfeLearning Content Development Company Code and Pixels.pdf
eLearning Content Development Company Code and Pixels.pdf
 
SPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementSPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product Management
 
Getting Started with Trello for Beginners.pptx
Getting Started with Trello for Beginners.pptxGetting Started with Trello for Beginners.pptx
Getting Started with Trello for Beginners.pptx
 
AI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriAI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit Bendigiri
 
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
 
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdfAUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
 
The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!
 
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
 
No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!
 
killingcamp longest common subsequence.pdf
killingcamp longest common subsequence.pdfkillingcamp longest common subsequence.pdf
killingcamp longest common subsequence.pdf
 
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A..."Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
 
Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)
 

Introduction to go lang

  • 2. Discussion Points ● History of Go. ● What is Go? ● What you’ll see in Go. ● What will you not see in Go. ● Why Go? ● Features ● Important Points. ● Who all are using Go ● Go installation ● Go Tools. ● Go structure. ● Types, Variables and Statements ● FrameWorks. ● Go Scope ● Go Docs ● Drawbacks
  • 3. Founders of Go. Ken Thompson Rob Pike Robert Griesemer Kenneth Lane Thompson is an American pioneer of computer science.Thompson worked at Bell Labs for most of his career where he designed and implemented the original Unix operating system. A Swiss computer scientist. He is best known for his work on the Go. Prior to Go, he worked on Google's V8 JavaScript engine, the Sawzall language, the Java HotSpot virtual machine, and the Strongtalk system. Robert "Rob" Pike is a Canadian programmer and author. He is best known for his work on the Go programming language and at Bell Labs, where he was a member of the Unix team.
  • 5. What is Go? ● Go is Open-Source General-Purpose programming language developed by Google. ● Solution to “BIG PROBLEMS” at Google.
  • 6. What you’ll see in Go. ● Compiled ● Garbage Collection ● Simple Syntax ● Great standard library ● Cross Platform ● Object Oriented (no Inheritance) ● Statically typed ● Extensive use of pointers ● Extensive use of Structures ● Extensive use of Interfaces ● Extensive use of If statements ● Extensive use of for loops ● Multiple returns
  • 7. What will you not see in Go. ● Exception Handling ● Inheritance ● Generics ● Assert ● Method Overloading ● Some loops ● Ternary Operator
  • 8. Why Go? ● Simplicity ● Eliminates Slowness ( Performance ). ● Secure and Easy to Maintain code. ● Concurrency ● Good Hardware Interaction. ● Speed for Production. ● Easy read, write, debug, and Maintain Large Software Systems (Google). ● Community For Starters
  • 9. Why Go? ● Why Go was developed when there already was many popular languages? Go was invented (in 2007) at a time when multicore CPU architectures were common.With multiple cores, code can run in parallel on all available cores; but there was no programming language that simplified the development of multithreaded applications. The responsibility of managing different threads safely and efficiently fell on developers. Thread-locking, race conditions and deadlocks are usual challenges. Go was designed with concurrent programming in mind. Golang FAQ states that in the days before Go, “One had to choose either efficient compilation, efficient execution, or ease of programming; all three were not available in the same mainstream Language.”
  • 10. Why Go? ● Why the Go Language Is Growing So Quickly? Go is a programming language that’s only a decade old. It has rapidly grown in popularity for optimization tasks that require lower level system access. In 2017, it was the fastest growing language in the world, because it can handle many of the same tasks as C or C++. As those languages have declined in popularity due to their complexity and confusing syntax, Go is increasingly filling the gap left behind.
  • 11. Go Features 1. Compile to Binary One major strength of Go is it runs as a compiled application, without an interpreter or framework standing in between. This means that Go compiles directly to binary machine code and runs directly. This makes Go faster, but it also means you don’t have to agree on and install the same interpreter on all machines. Go just works. 1. Garbage Collection Unlike other direct-compile languages, however, Go supports added features for system cleanup. With garbage collection included, you don’t need to remember to free up pointers or think about dangling pointers. All that gets done automatically.
  • 12. Go Features 3. Statically Typed In Go, you’ll need to declare types for all variables and function arguments at compile time. This increases the security of the language and points out errors early in the programming process. Especially for projects with many developers over a long period of time, static typing makes functions and libraries easier to understand. 4. No Exceptions Go forces developers to handle basic errors themselves rather than rely on a try catch block or other standard exception logic solutions. When you write in Go, you have to plan ahead for failure scenarios and think critically about what your program needs.
  • 13. Go Features 5. Concurrency & Routines Concurrency and parallelism aren’t the same thing. Parallel processing involves multiple processor cores working on different problems at the same time. Concurrency involves breaking multiple computations up into smaller chunks and scheduling them for concurrent work on a single processor. This means that various threads get broken up and processed in small bits over time. With the rise of microservices and the need for multiple database connections, message queues, and memory caches simultaneously, concurrent processing becomes increasingly important. Parallel and concurrent processing are not mutually exclusive, and in fact, Go is well-positioned to be the go-to language for data centers adding cores and looking for increased systems efficiency with multi-threading. A Goroutine is a lightweight thread. When initialized it has a stack of 4KB, smaller and faster to initialize than typical threads. Routines are also not mapped one-to-one with OS threads, and a single routine can run across multiple OS threads. This enables hundreds of thousands of routines to run concurrently and in parallel. The Go runtime scheduler manages and schedules all these threads for execution.
  • 14. Go Features 6. Maintainable Syntax Google places a premium on code that’s easy to understand because they have thousands of developers who need to be able to share and understand each others’ code. Go intentionally leaves out a lot of features for the sake of simplicity. There are no classes in Go, for example, only packages. There’s also no inheritance, constructors, annotations, or generics. Go is as simple to read as Ruby or Python, but it competes with C/C++ in terms of efficiency. It’s also built to be backward compatible, and the syntax has remained stable since launch.
  • 15. Go Features Other Features 1. Safe 2. C - inspired syntax 3. Multi paradigm 4. Great Standard library 5. Simplified Documentation 6. Fast 7. Light Weight 8. Open-Source 9. Build-in testing tool 10. Go - routines
  • 16. Go Important points 1. Object oriented without inheritance 2. Syntax sugar declaration 3. Strong and static types 4. Functions and methods which has receivers 5. Visibility based on the Case of First letter 6. Unused imports and variables causes errors 7. Excellent and complete standard library 8. Cross compilation capability
  • 18. Go Installation ● Straight forward ● Well documented ● https://go.dev/doc/install
  • 19. The Go Tool The go tool is the standard tool for building, testing, and installing Go programs. Compile and run hello.go: Run zip tests: Build and format the files in the current directory:
  • 20. The Go Tool The go tool is the standard tool for building, testing, and installing Go programs. Fetch and install websocket: Tool Commands : ● build - compile packages and dependencies ● clean - remove object files ● env - print go environment information ● fix - run go tool fix on packages ● fmt - run go fmt on package sources ● get - download and install packages and dependencies ● install - compile and install packages and dependencies ● list - list the packages ● run - compile and run go program ● test - test packages ● tool - run specified tool ● version - print go version
  • 21. Go Structure 1. Package declaration 2. Import statements 3. Variables 4. Statements and Expressions 5. Functions 6. Comments
  • 22. Go Datatypes 1. Basic type: Numbers, strings, and booleans come under this category. 2. Aggregate type: Array and structs come under this category. 3. Reference type: Pointers, slices, maps, functions, and channels come under this category. 4. Interface type
  • 23. Go Variables 1. var <v_name> <type> 2. var <v_name> <type> = expression 3. var <v_name> = expression 4. <v_name> := expression
  • 25. Go Conditional Statements 2. If else Statement
  • 26. Go Conditional Statements 3. If else-if Statement
  • 28. Go Conditional Statements 4.2 fallthrough cases switch
  • 29. Go Conditional Statements 4.3 multiple cases switch
  • 30. Go Control Statements ● Go do not has while loops ● Go only has for loops ● For loops serves different purposes using different format Traditional For loop :
  • 32. Go Control Statements For loop over string : Infinite loop:
  • 33. Go Frameworks ● Gin Gin is an HTTP web framework written in Go that is immensely popular with over 50k stars on Github at the time of posting. ● Beego Beego is another Go web framework that is mostly used to build enterprise web applications with rapid development.
  • 34. Go Frameworks ● Iris Iris is an Express.js-equivalent web framework that is easier to use for people coming from the Node.js community. ● Echo Echo is another promising framework created by Labstack with 20k stars on GitHub.
  • 35. Go Frameworks ● Fiber Fiber is another Express.js-like web framework written in Go that boasts low memory usage and rich routing. Built on top of the Fasthttp HTTP engine for Go
  • 36. Go Frameworks Framework Stars Forks Gin 55,533 6,290 Beego 27,707 5,407 Iris 21,835 2,357 Echo 21,632 1,910 Fiber 18,255 953 FastHttp 16,899 1,421 Ravel 12,488 1,409 Martini 11,406 1,133 Buffalo 6,574 508
  • 37. Go Scope Aside from building general web applications, the language’s scope encompasses a wide range of use cases: ● Command line application ● Cloud-native development ● Creating utilities and stand-alone libraries ● Developing databases, such as CockroachDB ● Game development ● Development operations
  • 38. Go Docs and websites Official Support ● https://go.dev/doc/ ● https://go.dev/play/ ● https://pkg.go.dev/ Other Support ● https://devdocs.io/go/ ● https://www.golangprograms.com/go-language.html ● https://join.slack.com/t/gophers/shared_invite/zt-11ddswns3-S__IcQcJRsVqlmCDafl5_A
  • 39. Go Drawbacks 1. Young Language, still developing 2. Absence of manual memory management 3. Error handling isn’t perfect 4. Lack of Function Overloading and Default Values for Arguments 5. Lack of Generics 6. No inheritance
  • 40. Thank you. Questions? “Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning.” - Albert Einstein