SlideShare a Scribd company logo
1 of 17
Download to read offline
WELCOME TO GO
GOLANG AS COMMON LANGUAGE
PHILIP, YOU HAVE TO CHECKOUT
GOLANG, IT IS VERY POWERFUL
FOR DOING DEVOPS!
@rnrbarbosa Roberto Barbosa, December 2018
- Unixer (IBM AIX)
- Linuxer (RHEL, Debian,
SLES)
- SysAdmin, Middleware
Engineer @swisspost
- MAS in Software
Development
- Containers (Dotcloud,
Tutum, Kubernetes)
- Cloudbee (AWS,
Digitalocean)
- Python and Django in
Sparetime
- Most productive on Mac
OSX
- Learning Golang
WHO AM I
PHILIP SAHLI
WHY THEY
CREATED GO
Rob Pike Bell Labs, Unix, UTF-8
Ken Thompson Bell Labs, B, UTF-8
Robert Griesemer C++
Go was born out of frustration with existing languages and
environments for the work we were doing at Google.
Programming had become too difficult and the choice of
languages was partly to blame. One had to choose either efficient
compilation, efficient execution, or ease of programming; all
three were not available in the same mainstream language.
Source: https://golang.org/doc/faq#creating_a_new_language
GO IS YOUNG
2007 - 2009
2012 Version 1.0
Work on first release
go1.11 (released 2018/08/24)

go1.10 (released 2018/02/16)

go1.9 (released 2017/08/24)

go1.8 (released 2017/02/16)

go1.7 (released 2016/08/15)

go1.6 (released 2016/02/17)

go1.5 (released 2015/08/19)

go1.4 (released 2014/12/10)

go1.3 (released 2014/06/18)

go1.2 (released 2013/12/01)

go1.1 (released 2013/05/13)

go1 (released 2012/03/28)
WHAT IS GO
- Statically typed
- Compiled to native machine code
WHO USES GO
GO IS SIMPLE
KEYWORDS
0
22.5
45
67.5
90
C++ C# PHP JAVA RUBY PYTHON GO
WriteReadLearn Run Maintain
IS GO OBJECT-
ORIENTED?
- No classes, no inheritance
- Composition over inheritance
WHY TO USE GO
Open Source
One binary
Dependencies
Fast compilation
Readability
Standard Libraries
Concurrency
Command-line Tools
IDE
SIMPLE, RELIABLE AND EFFICIENT
METHODS
Go does not have classes. However, you can define methods on types.
A method is a function with a special receiver argument.
type Vertex struct {
X, Y float64
}
func (v Vertex) Abs() float64 {
return math.Sqrt(v.X*v.X + v.Y*v.Y)
}
POINTERSpackage main
import "fmt"
func main() {
i, j := 42, 2701
p := &i // point to i

fmt.Println(*p) // read i through the pointer

*p = 21 // set i through the pointer

fmt.Println(i) // see the new value of i
p = &j // point to j

*p = *p / 37 // divide j through the pointer

fmt.Println(j) // see the new value of j
}
Go has pointers. A pointer holds the memory address of a value.
DEPENDENCIES
go get github.com/philipsahli/gontador/src"
dep init

dep ensure —-update
import "github.com/philipsahli/gontador/src"1
2
3 go build
EASY TO USE
FORKS
DEMO
As a DevOp Engineer I need a command-line tool
so that team members can list in any CLI the linux
servers from Confnix.
EVERY DEVOPS MEMBER CAN CREATE
AND MAINTAIN APPLICATIONS IN A
COMMON LANGUAGE.
Me, January 2019
HOW TO
LEARN GO
- IDE 

https://
marketplace.visualstudio.c
om/items?itemName=ms-
vscode.Go
- Golang Tour & Camps

https://tour.golang.org

http://
www.golangbootcamp.co
m/book
- Udemy Course

https://www.udemy.com/
go-the-complete-
developers-guide/
- Golang Doc

https://golang.org/pkg/

https://godoc.org/
- Gontador

https://github.com/
philipsahli/gontador/
READY TO GO?

More Related Content

Similar to Welcome to Go

Introduction to Programming in Go
Introduction to Programming in GoIntroduction to Programming in Go
Introduction to Programming in GoAmr Hassan
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using SwiftDiego Freniche Brito
 
The GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersThe GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersAlessandro Sanino
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughgabriellekuruvilla
 
علم البيانات - Data Sience
علم البيانات - Data Sience علم البيانات - Data Sience
علم البيانات - Data Sience App Ttrainers .com
 
Language-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchLanguage-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchAndrew Lowe
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageAniruddha Chakrabarti
 
What every beginning developer should know
What every beginning developer should knowWhat every beginning developer should know
What every beginning developer should knowAndy Lester
 
Happy Go Programming Part 1
Happy Go Programming Part 1Happy Go Programming Part 1
Happy Go Programming Part 1Lin Yo-An
 
The Art of Evolutionary Algorithms Programming
The Art of Evolutionary Algorithms ProgrammingThe Art of Evolutionary Algorithms Programming
The Art of Evolutionary Algorithms ProgrammingJuan J. Merelo
 
Docopt, beautiful command-line options for R, user2014
Docopt, beautiful command-line options for R,  user2014Docopt, beautiful command-line options for R,  user2014
Docopt, beautiful command-line options for R, user2014Edwin de Jonge
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Guillaume Laforge
 
Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Robert Stern
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksGlen Ogilvie
 
Introduction to Go language
Introduction to Go languageIntroduction to Go language
Introduction to Go languageTzar Umang
 

Similar to Welcome to Go (20)

Introduction to Programming in Go
Introduction to Programming in GoIntroduction to Programming in Go
Introduction to Programming in Go
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
The GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersThe GO Language : From Beginners to Gophers
The GO Language : From Beginners to Gophers
 
IntroML_2.
IntroML_2.IntroML_2.
IntroML_2.
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthrough
 
علم البيانات - Data Sience
علم البيانات - Data Sience علم البيانات - Data Sience
علم البيانات - Data Sience
 
Language-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchLanguage-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible research
 
biopython, doctest and makefiles
biopython, doctest and makefilesbiopython, doctest and makefiles
biopython, doctest and makefiles
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
 
What every beginning developer should know
What every beginning developer should knowWhat every beginning developer should know
What every beginning developer should know
 
Pyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdfPyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdf
 
Go. Why it goes
Go. Why it goesGo. Why it goes
Go. Why it goes
 
Happy Go Programming Part 1
Happy Go Programming Part 1Happy Go Programming Part 1
Happy Go Programming Part 1
 
Go for Rubyists
Go for RubyistsGo for Rubyists
Go for Rubyists
 
The Art of Evolutionary Algorithms Programming
The Art of Evolutionary Algorithms ProgrammingThe Art of Evolutionary Algorithms Programming
The Art of Evolutionary Algorithms Programming
 
Docopt, beautiful command-line options for R, user2014
Docopt, beautiful command-line options for R,  user2014Docopt, beautiful command-line options for R,  user2014
Docopt, beautiful command-line options for R, user2014
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007
 
Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricks
 
Introduction to Go language
Introduction to Go languageIntroduction to Go language
Introduction to Go language
 

Recently uploaded

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
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
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
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 

Recently uploaded (20)

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
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
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 

Welcome to Go

  • 1. WELCOME TO GO GOLANG AS COMMON LANGUAGE
  • 2. PHILIP, YOU HAVE TO CHECKOUT GOLANG, IT IS VERY POWERFUL FOR DOING DEVOPS! @rnrbarbosa Roberto Barbosa, December 2018
  • 3. - Unixer (IBM AIX) - Linuxer (RHEL, Debian, SLES) - SysAdmin, Middleware Engineer @swisspost - MAS in Software Development - Containers (Dotcloud, Tutum, Kubernetes) - Cloudbee (AWS, Digitalocean) - Python and Django in Sparetime - Most productive on Mac OSX - Learning Golang WHO AM I PHILIP SAHLI
  • 4. WHY THEY CREATED GO Rob Pike Bell Labs, Unix, UTF-8 Ken Thompson Bell Labs, B, UTF-8 Robert Griesemer C++ Go was born out of frustration with existing languages and environments for the work we were doing at Google. Programming had become too difficult and the choice of languages was partly to blame. One had to choose either efficient compilation, efficient execution, or ease of programming; all three were not available in the same mainstream language. Source: https://golang.org/doc/faq#creating_a_new_language
  • 5. GO IS YOUNG 2007 - 2009 2012 Version 1.0 Work on first release go1.11 (released 2018/08/24)
 go1.10 (released 2018/02/16)
 go1.9 (released 2017/08/24)
 go1.8 (released 2017/02/16)
 go1.7 (released 2016/08/15)
 go1.6 (released 2016/02/17)
 go1.5 (released 2015/08/19)
 go1.4 (released 2014/12/10)
 go1.3 (released 2014/06/18)
 go1.2 (released 2013/12/01)
 go1.1 (released 2013/05/13)
 go1 (released 2012/03/28)
  • 6. WHAT IS GO - Statically typed - Compiled to native machine code
  • 8. GO IS SIMPLE KEYWORDS 0 22.5 45 67.5 90 C++ C# PHP JAVA RUBY PYTHON GO WriteReadLearn Run Maintain
  • 9. IS GO OBJECT- ORIENTED? - No classes, no inheritance - Composition over inheritance
  • 10. WHY TO USE GO Open Source One binary Dependencies Fast compilation Readability Standard Libraries Concurrency Command-line Tools IDE SIMPLE, RELIABLE AND EFFICIENT
  • 11. METHODS Go does not have classes. However, you can define methods on types. A method is a function with a special receiver argument. type Vertex struct { X, Y float64 } func (v Vertex) Abs() float64 { return math.Sqrt(v.X*v.X + v.Y*v.Y) }
  • 12. POINTERSpackage main import "fmt" func main() { i, j := 42, 2701 p := &i // point to i
 fmt.Println(*p) // read i through the pointer
 *p = 21 // set i through the pointer
 fmt.Println(i) // see the new value of i p = &j // point to j
 *p = *p / 37 // divide j through the pointer
 fmt.Println(j) // see the new value of j } Go has pointers. A pointer holds the memory address of a value.
  • 13. DEPENDENCIES go get github.com/philipsahli/gontador/src" dep init
 dep ensure —-update import "github.com/philipsahli/gontador/src"1 2 3 go build EASY TO USE FORKS
  • 14. DEMO As a DevOp Engineer I need a command-line tool so that team members can list in any CLI the linux servers from Confnix.
  • 15. EVERY DEVOPS MEMBER CAN CREATE AND MAINTAIN APPLICATIONS IN A COMMON LANGUAGE. Me, January 2019
  • 16. HOW TO LEARN GO - IDE 
 https:// marketplace.visualstudio.c om/items?itemName=ms- vscode.Go - Golang Tour & Camps
 https://tour.golang.org
 http:// www.golangbootcamp.co m/book - Udemy Course
 https://www.udemy.com/ go-the-complete- developers-guide/ - Golang Doc
 https://golang.org/pkg/
 https://godoc.org/ - Gontador
 https://github.com/ philipsahli/gontador/