SlideShare una empresa de Scribd logo
1 de 19
Fundamentals of
Go Lang
Hacktoberfest extended Galle 2018
Introduction
What is Golang?
What is Golang?
Go or Golang is a
programming language
created by Google in 2009.
Uses syntaxes similar to C
Features
Simplicity
Go is a relatively simple language and was designed with a very
minimalistic approach
01
Concurrency mechanisms
Go make it easy to write programs that get the most out of multi core and
networked machines
02
Object Orientated
Object-oriented programming is a programming paradigm based on the
concept of "objects"
03
The Compiler
Go’s compiler is super fast. It is easily possible to compile a large Go
program within a few seconds.
04
Go Programmes
A typical go programme
looks like this.
Go Structure
There are 3 main sections
in a Go programme
package main
import "fmt"
func main(){
fmt.Println("Hello World")
}
Packages
Imports
Functions
What is a package?
A set of source files organized into a system directory.
Eg: fmt, Math, main
Every Go program is made up of packages.
Executable files starts in “main” package.
Main tells the Go compiler to compile the
programe as an executable file
What is import?
A command (A keyword) used to import a package
into another package.
What are functions?
A function is an independent section of code that
maps zero or more input parameters to zero or more
output parameters.
How to write?
Define the function.
Define parameters.
Define output data type.
Define the action
Sample of an add function
Variable declaration
Var <name> <data_type>
How to Run?
Go run <filename.go>
Input / Output
Input and output methods are defined in the package
”fmt”
Output
fmt.Print(Your_text)
Input
fmt.Scanln(&Variable_name)
Lets Code!
Thank you
Suvin Nimnaka
RITS | Richmond Live

Más contenido relacionado

Similar a Fundamentals of Golang

Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go langAmal Mohan N
 
Golang development go language services in kerala- go language development in...
Golang development go language services in kerala- go language development in...Golang development go language services in kerala- go language development in...
Golang development go language services in kerala- go language development in...Zewia Software Solutions (P) Ltd
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageAniruddha Chakrabarti
 
Scaling applications with go
Scaling applications with goScaling applications with go
Scaling applications with goVimlesh Sharma
 
Go vs Python Comparison
Go vs Python ComparisonGo vs Python Comparison
Go vs Python ComparisonSimplilearn
 
Golang, Future of Programming Language.
Golang, Future of Programming Language.Golang, Future of Programming Language.
Golang, Future of Programming Language.Sunil Yadav
 
Introduction to Programming in Go
Introduction to Programming in GoIntroduction to Programming in Go
Introduction to Programming in GoAmr Hassan
 
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
 
Golang presentaion-2018-07-26
Golang presentaion-2018-07-26Golang presentaion-2018-07-26
Golang presentaion-2018-07-26Shintaro Ikeda
 
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
 
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
 
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5Amanda Lam
 
When, how &amp; why use golang in 2021 go benefits &amp; use cases
When, how &amp; why use golang in 2021  go benefits &amp; use casesWhen, how &amp; why use golang in 2021  go benefits &amp; use cases
When, how &amp; why use golang in 2021 go benefits &amp; use casesKaty Slemon
 

Similar a Fundamentals of Golang (20)

Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
Comparing C and Go
Comparing C and GoComparing C and Go
Comparing C and Go
 
Golang development go language services in kerala- go language development in...
Golang development go language services in kerala- go language development in...Golang development go language services in kerala- go language development in...
Golang development go language services in kerala- go language development in...
 
Google GO
Google GOGoogle GO
Google GO
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
 
Beginning development in go
Beginning development in goBeginning development in go
Beginning development in go
 
Scaling applications with go
Scaling applications with goScaling applications with go
Scaling applications with go
 
Go vs Python Comparison
Go vs Python ComparisonGo vs Python Comparison
Go vs Python Comparison
 
Golang, Future of Programming Language.
Golang, Future of Programming Language.Golang, Future of Programming Language.
Golang, Future of Programming Language.
 
Introduction to Programming in Go
Introduction to Programming in GoIntroduction to Programming in Go
Introduction to Programming in Go
 
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 ...
 
Golang introduction
Golang introductionGolang introduction
Golang introduction
 
Golang presentaion-2018-07-26
Golang presentaion-2018-07-26Golang presentaion-2018-07-26
Golang presentaion-2018-07-26
 
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 MyLittleAdventure
 
Rise of software
Rise of softwareRise of software
Rise of software
 
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
 
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
 
When, how &amp; why use golang in 2021 go benefits &amp; use cases
When, how &amp; why use golang in 2021  go benefits &amp; use casesWhen, how &amp; why use golang in 2021  go benefits &amp; use cases
When, how &amp; why use golang in 2021 go benefits &amp; use cases
 
Workshop - Golang language
Workshop - Golang languageWorkshop - Golang language
Workshop - Golang language
 

Más de Suvin Nimnaka

Building a Better World with GitHub.
Building a Better World with GitHub.Building a Better World with GitHub.
Building a Better World with GitHub.Suvin Nimnaka
 
Cognitive Robotics & Applications.pdf
Cognitive Robotics & Applications.pdfCognitive Robotics & Applications.pdf
Cognitive Robotics & Applications.pdfSuvin Nimnaka
 
OIDC Authentication with Firebase Identity Platform
OIDC Authentication with Firebase Identity PlatformOIDC Authentication with Firebase Identity Platform
OIDC Authentication with Firebase Identity PlatformSuvin Nimnaka
 
The right way, wrong way and the CLI way by Suvink.pdf
The right way, wrong way and the CLI way by Suvink.pdfThe right way, wrong way and the CLI way by Suvink.pdf
The right way, wrong way and the CLI way by Suvink.pdfSuvin Nimnaka
 
Open Source, open world!
 Open Source, open world! Open Source, open world!
Open Source, open world!Suvin Nimnaka
 
RailTrack - Team Regex Enmo Challenge Pitch.pdf
RailTrack - Team Regex Enmo Challenge Pitch.pdfRailTrack - Team Regex Enmo Challenge Pitch.pdf
RailTrack - Team Regex Enmo Challenge Pitch.pdfSuvin Nimnaka
 
Go codeless with twilio studio.pptx
Go codeless with twilio studio.pptxGo codeless with twilio studio.pptx
Go codeless with twilio studio.pptxSuvin Nimnaka
 
Introduction to Twilio.pptx
Introduction to Twilio.pptxIntroduction to Twilio.pptx
Introduction to Twilio.pptxSuvin Nimnaka
 
WhiteBoard by Alphabet
WhiteBoard by AlphabetWhiteBoard by Alphabet
WhiteBoard by AlphabetSuvin Nimnaka
 

Más de Suvin Nimnaka (13)

Building a Better World with GitHub.
Building a Better World with GitHub.Building a Better World with GitHub.
Building a Better World with GitHub.
 
Git Init
Git InitGit Init
Git Init
 
Cognitive Robotics & Applications.pdf
Cognitive Robotics & Applications.pdfCognitive Robotics & Applications.pdf
Cognitive Robotics & Applications.pdf
 
OIDC Authentication with Firebase Identity Platform
OIDC Authentication with Firebase Identity PlatformOIDC Authentication with Firebase Identity Platform
OIDC Authentication with Firebase Identity Platform
 
The right way, wrong way and the CLI way by Suvink.pdf
The right way, wrong way and the CLI way by Suvink.pdfThe right way, wrong way and the CLI way by Suvink.pdf
The right way, wrong way and the CLI way by Suvink.pdf
 
Open Source, open world!
 Open Source, open world! Open Source, open world!
Open Source, open world!
 
RailTrack - Team Regex Enmo Challenge Pitch.pdf
RailTrack - Team Regex Enmo Challenge Pitch.pdfRailTrack - Team Regex Enmo Challenge Pitch.pdf
RailTrack - Team Regex Enmo Challenge Pitch.pdf
 
Go codeless with twilio studio.pptx
Go codeless with twilio studio.pptxGo codeless with twilio studio.pptx
Go codeless with twilio studio.pptx
 
Twilio with ReactJS
Twilio with ReactJSTwilio with ReactJS
Twilio with ReactJS
 
Introduction to Twilio.pptx
Introduction to Twilio.pptxIntroduction to Twilio.pptx
Introduction to Twilio.pptx
 
Uniacc by G5X
Uniacc by G5XUniacc by G5X
Uniacc by G5X
 
WhiteBoard by Alphabet
WhiteBoard by AlphabetWhiteBoard by Alphabet
WhiteBoard by Alphabet
 
Just google
Just googleJust google
Just google
 

Último

Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 

Último (20)

Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 

Fundamentals of Golang