SlideShare a Scribd company logo
1 of 24
Download to read offline
Introduction to Go Language 
GDGDEVFESTBAGUIO -CAR 2014 
UNIVERSITY OF BAGUIO 
TZAR C. UMANG 
ICT DIRECTOR –HIVE INC.
Flow of discussion 
Requirements 
Introduction 
Basics 
Sample Deployment
Requirements 
Development 
Software Development Kit and Test Environment 
You can use Appengine’sGo SDK: https://cloud.google.com/appengine/downloads 
Python 2.7 (please don’t use the newest version) 
IDE 
You can use Sublimetxtand notepad++ 
If your on the cloud you can use Github’sonline IDE 
Pushing files when Deploying 
Git: http://git-scm.com
Requirements 
Development Servers 
Highly recommend Google’s Appenginefor Go Language 
You can also use Openshift’sGo Language Environment, but you will not have access to Appengine’sfunctionalities 
Deployment 
You can use Appengine+ Cloudcomputeof Google 
Or OpenshiftBig Gear
Young Language 
Created by: Robert Griesemer, Ken Thompson, and Rob Pike (Googlers) in late 2007 
Brought to public in 2009 
A new systems programming languagefor the past 10 years + 
It is fastto develop, compileand run 
Answer to hardware’s limitations today, yet future proofing your system, where the language handles routine and memory management 
Funand Easymaking developmentmore productiveand we don’t use semicolons “;” 
Uses goroutines, a lightweight communicating processes and its concurrent, multiplexing of it onto threads is done automatically 
Has a good garbage collection, it is efficient and low in latency
Basics -“Hello World” 
package helloworld 
import ( 
"fmt" 
"net/http" //http handler package 
) 
funcinit() { 
http.HandleFunc("/", handle) 
} 
funchandle(w http.ResponseWriter, r *http.Request) { 
fmt.Fprint(w, "<html><body><b>Hello World</b></body></html>") 
}
Basics 
Comments 
Uses /**/ or // 
// for line by line comment 
/**/ for large chunk disabling of function or a big header credit on your code
Basics 
Formatting 
Indention is just like any other IDE for any PL tab works for them 
gofmthandles alignment on you code 
Parenthesis 
Go uses lesser parenthesis 
Structures like if, for and switch don’t require it 
Operator precedence hierarchy is shorter and clearer 
x<<8 + y<<16 //spaces implies what it means
Basics 
Semicolons “ ; “ 
We don’t usually use it to terminate a line just like python 
Mostly used to separate clauses of for –loops and the like 
Making codes cleaner on the eye
Basics 
If –statement 
It looks as simple as this 
if a > 1 { 
return b 
} 
It also accept initialization statements, to setup a local variable 
if err := datastore.Get(c, key, &b); err != nil { 
return err 
}
Basics 
Loop 
Unified for and while, there is no do-while 
For 
for init; condition; post { } 
While 
for condition { } 
For(;;) 
for { } 
No comma operator and “+ +” and “--” are statements not expression 
//Reversea 
fori,j:=0,len(a)1;i<j;i,j=i+1,j1{ 
a[i],a[j]=a[j],a[i] 
} 
To run multiple variables you need to use assignments
Basics 
Switch 
Go uses a more general implementation of switches 
Expressions don’t need to be constants or even integers 
Cases are evaluated top to bottom until a match is found 
And if switch has no statement it switches to “true” 
Making it possible to write if-else-if-else-if-else chain as a switch
Basics 
Switch 
funcunhex(cbyte)byte{ 
switch{ 
case'0'<=c&&c<='9': 
returnc'0' 
case'a'<=c&&c<='f': 
returnc'a'+10 
case'A'<=c&&c<='F': 
returnc'A'+10 
} 
return0 
}
Basics 
Switch 
Cases can be presented into commas as well 
funcrunOver(cbyte)bool{ 
switchc{ 
case'','?','&','=','#','+','%': 
returntrue 
} 
returnfalse 
}
Basics 
Types 
It uses the regular int, float, string 
Booleans (&& “and”, || “or”, ! “not”) 
Explicitly sized typesthe likes of int8, float64 
Unsigned integers, uint, uint32
Basics 
Strings 
It is built in, these are immutable values not just arrays of bytes values. 
You can’t change a string variable once it is built 
Though you can use snippets to change or to reassign string variables 
s:="hello" 
ifs[1]!='e'{os.Exit(1)} 
s="goodbye" 
varp*string=&s 
*p="ciao"
Basics 
Arrays 
Declared this way 
vararrayOfInt[10]int; 
They are like strings with values though mutable 
Arrays holds values in Go making it as meaningful as a string, not like with other language such as C where arrays are pointers
Basics 
Pointers 
We have them but they are limited 
No pointer arithmetic 
Easier for garbage collection
Basics 
Database supported 
MySQL, Oracle, DB2 
MongoDB, NoSQL 
Mobile App Delivery Supported Platform and Framework (Based on our testing) 
Intel XDK 
Phonegap
Basics 
Libraries 
OS, I/O, files 
math (sin(x) etc.) 
strings, Unicode, regular expressions 
reflection 
command-line flags, logging 
hashes, crypto 
testing (plus testing tool, gotest) 
networking, HTTP, RPC 
HTML (and more general) templates 
And growing… 
Documentation and complete list here: http://golang.org
Other Resources 
http://golang.org/pkg/ (package docs) 
http://golang.org/src/ (source code)
Requirements 
Development 
Software Development Kit 
You can use Appengine’sGo SDK: https://cloud.google.com/appengine/downloads 
Python 2.7 (please don’t use the newest version) 
IDE 
You can use Sublimetxtand notepad++ 
If your on the cloud you can use Github’sonline IDE 
Pushing files 
Git: http://git-scm.com
Requirements 
Development Servers 
Highly recommend Google’s Appenginefor Go Language 
You can also Openshift’sGo Language Environment, but you will not have access to Appengine’sfunctionalities 
Deployment 
You can use Appengine+ Cloudcomputeof Google 
Or OpenshiftBig Gear
THANK YOU!!! 
For Questions and Tutorials you may join the group 
“Philippine Gophers” in FB and G+ 
Or add me in: 
fb.com/tzarumang 
twitter.com/definitelytzar 
plus.google.com/tzarumang 
Presentation is based from: 
golang.org 
Chris Lupo’sThe Go Programming Language

More Related Content

What's hot

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 Go programming language
Introduction to Go programming languageIntroduction to Go programming language
Introduction to Go programming languageSlawomir Dorzak
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)Ishin Vin
 
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
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go langAmal Mohan N
 
Golang (Go Programming Language)
Golang (Go Programming Language)Golang (Go Programming Language)
Golang (Go Programming Language)ShubhamMishra485
 
Golang and Eco-System Introduction / Overview
Golang and Eco-System Introduction / OverviewGolang and Eco-System Introduction / Overview
Golang and Eco-System Introduction / OverviewMarkus Schneider
 
Introduction to GoLang
Introduction to GoLangIntroduction to GoLang
Introduction to GoLangNVISIA
 
Go Concurrency
Go ConcurrencyGo Concurrency
Go Concurrencyjgrahamc
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by GoogleUttam Gandhi
 
Goroutines and Channels in practice
Goroutines and Channels in practiceGoroutines and Channels in practice
Goroutines and Channels in practiceGuilherme Garnier
 
Concurrency in Golang
Concurrency in GolangConcurrency in Golang
Concurrency in GolangOliver N
 
Introduction to Go programming
Introduction to Go programmingIntroduction to Go programming
Introduction to Go programmingExotel
 

What's hot (20)

Go lang
Go langGo lang
Go lang
 
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
 
Golang
GolangGolang
Golang
 
Introduction to Go programming language
Introduction to Go programming languageIntroduction to Go programming language
Introduction to Go programming language
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)
 
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)
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
Golang (Go Programming Language)
Golang (Go Programming Language)Golang (Go Programming Language)
Golang (Go Programming Language)
 
Golang workshop
Golang workshopGolang workshop
Golang workshop
 
Go Language presentation
Go Language presentationGo Language presentation
Go Language presentation
 
Golang Template
Golang TemplateGolang Template
Golang Template
 
Go Lang Tutorial
Go Lang TutorialGo Lang Tutorial
Go Lang Tutorial
 
Golang and Eco-System Introduction / Overview
Golang and Eco-System Introduction / OverviewGolang and Eco-System Introduction / Overview
Golang and Eco-System Introduction / Overview
 
Introduction to GoLang
Introduction to GoLangIntroduction to GoLang
Introduction to GoLang
 
Go Concurrency
Go ConcurrencyGo Concurrency
Go Concurrency
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by Google
 
Goroutines and Channels in practice
Goroutines and Channels in practiceGoroutines and Channels in practice
Goroutines and Channels in practice
 
Concurrency in Golang
Concurrency in GolangConcurrency in Golang
Concurrency in Golang
 
GoLang Introduction
GoLang IntroductionGoLang Introduction
GoLang Introduction
 
Introduction to Go programming
Introduction to Go programmingIntroduction to Go programming
Introduction to Go programming
 

Viewers also liked

Software engineer
Software engineerSoftware engineer
Software engineerxccoffey10
 
Learning Analytics - What Do Stakeholders Really Think?
Learning Analytics - What Do Stakeholders Really Think?Learning Analytics - What Do Stakeholders Really Think?
Learning Analytics - What Do Stakeholders Really Think?Neil Witt
 
Life Sciences: Career Development in Europe and Asia
Life Sciences: Career Development in Europe and AsiaLife Sciences: Career Development in Europe and Asia
Life Sciences: Career Development in Europe and AsiaKelly Services
 
Agile Methodologies and Cost Estimation
Agile Methodologies and Cost EstimationAgile Methodologies and Cost Estimation
Agile Methodologies and Cost Estimationshansa2014
 
bti asia salary guide
bti asia salary guidebti asia salary guide
bti asia salary guideFebrian ‎
 
Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...
Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...
Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...Xamarin
 
Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...
Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...
Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...Travis Albee
 
GO Mobile presentation for English Language Centre at the University of Liver...
GO Mobile presentation for English Language Centre at the University of Liver...GO Mobile presentation for English Language Centre at the University of Liver...
GO Mobile presentation for English Language Centre at the University of Liver...Alex Spiers
 
Developing a technology enhanced learning strategy
Developing a technology enhanced learning strategyDeveloping a technology enhanced learning strategy
Developing a technology enhanced learning strategySarah Knight
 
Natural Resources: Career Development in Europe and Asia
Natural Resources: Career Development in Europe and AsiaNatural Resources: Career Development in Europe and Asia
Natural Resources: Career Development in Europe and AsiaKelly Services
 
Estimation or, "How to Dig your Grave"
Estimation or, "How to Dig your Grave"Estimation or, "How to Dig your Grave"
Estimation or, "How to Dig your Grave"Rowan Merewood
 
Project-Based Instruction and the Importance of Self-Directed Learning
Project-Based Instruction and the Importance of Self-Directed LearningProject-Based Instruction and the Importance of Self-Directed Learning
Project-Based Instruction and the Importance of Self-Directed LearningLinkedIn Learning Solutions
 
Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...
Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...
Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...DEVCON
 
#CodingL1: Coding as a (second) mother language
#CodingL1: Coding as a (second) mother language#CodingL1: Coding as a (second) mother language
#CodingL1: Coding as a (second) mother languageAlessandro Bogliolo
 
Spark Streaming Tips for Devs and Ops by Fran perez y federico fernández
Spark Streaming Tips for Devs and Ops by Fran perez y federico fernándezSpark Streaming Tips for Devs and Ops by Fran perez y federico fernández
Spark Streaming Tips for Devs and Ops by Fran perez y federico fernándezJ On The Beach
 
Coding as a (second) Language
Coding as a (second) LanguageCoding as a (second) Language
Coding as a (second) LanguageKenneth Ronkowitz
 

Viewers also liked (20)

Software engineer
Software engineerSoftware engineer
Software engineer
 
Learning Analytics - What Do Stakeholders Really Think?
Learning Analytics - What Do Stakeholders Really Think?Learning Analytics - What Do Stakeholders Really Think?
Learning Analytics - What Do Stakeholders Really Think?
 
Life Sciences: Career Development in Europe and Asia
Life Sciences: Career Development in Europe and AsiaLife Sciences: Career Development in Europe and Asia
Life Sciences: Career Development in Europe and Asia
 
Agile cost estimation
Agile cost estimationAgile cost estimation
Agile cost estimation
 
Agile Methodologies and Cost Estimation
Agile Methodologies and Cost EstimationAgile Methodologies and Cost Estimation
Agile Methodologies and Cost Estimation
 
bti asia salary guide
bti asia salary guidebti asia salary guide
bti asia salary guide
 
Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...
Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...
Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...
 
Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...
Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...
Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...
 
GO Mobile presentation for English Language Centre at the University of Liver...
GO Mobile presentation for English Language Centre at the University of Liver...GO Mobile presentation for English Language Centre at the University of Liver...
GO Mobile presentation for English Language Centre at the University of Liver...
 
Developing a technology enhanced learning strategy
Developing a technology enhanced learning strategyDeveloping a technology enhanced learning strategy
Developing a technology enhanced learning strategy
 
Natural Resources: Career Development in Europe and Asia
Natural Resources: Career Development in Europe and AsiaNatural Resources: Career Development in Europe and Asia
Natural Resources: Career Development in Europe and Asia
 
Estimation or, "How to Dig your Grave"
Estimation or, "How to Dig your Grave"Estimation or, "How to Dig your Grave"
Estimation or, "How to Dig your Grave"
 
Project-Based Instruction and the Importance of Self-Directed Learning
Project-Based Instruction and the Importance of Self-Directed LearningProject-Based Instruction and the Importance of Self-Directed Learning
Project-Based Instruction and the Importance of Self-Directed Learning
 
Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...
Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...
Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...
 
#CodingL1: Coding as a (second) mother language
#CodingL1: Coding as a (second) mother language#CodingL1: Coding as a (second) mother language
#CodingL1: Coding as a (second) mother language
 
Spark Streaming Tips for Devs and Ops by Fran perez y federico fernández
Spark Streaming Tips for Devs and Ops by Fran perez y federico fernándezSpark Streaming Tips for Devs and Ops by Fran perez y federico fernández
Spark Streaming Tips for Devs and Ops by Fran perez y federico fernández
 
Code Drives the World
Code Drives the WorldCode Drives the World
Code Drives the World
 
Coding as a (second) Language
Coding as a (second) LanguageCoding as a (second) Language
Coding as a (second) Language
 
Creating a Culture of Learning in the New Year
Creating a Culture of Learning in the New YearCreating a Culture of Learning in the New Year
Creating a Culture of Learning in the New Year
 
2017 - Salary Guide
2017 - Salary Guide2017 - Salary Guide
2017 - Salary Guide
 

Similar to Introduction to Go language

Yeahhhh the final requirement!!!
Yeahhhh the final requirement!!!Yeahhhh the final requirement!!!
Yeahhhh the final requirement!!!olracoatalub
 
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
 
Switch case and looping new
Switch case and looping newSwitch case and looping new
Switch case and looping newaprilyyy
 
Switch case and looping kim
Switch case and looping kimSwitch case and looping kim
Switch case and looping kimkimberly_Bm10203
 
Macasu, gerrell c.
Macasu, gerrell c.Macasu, gerrell c.
Macasu, gerrell c.gerrell
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScriptOleg Podsechin
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with PythonBrian Lyttle
 
Mark asoi ppt
Mark asoi pptMark asoi ppt
Mark asoi pptmark-asoi
 
Fundamentals of programming angeli
Fundamentals of programming angeliFundamentals of programming angeli
Fundamentals of programming angelibergonio11339481
 
Go 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX GoGo 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX GoRodolfo Carvalho
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James NelsonGWTcon
 
KScope14 Jython Scripting
KScope14 Jython ScriptingKScope14 Jython Scripting
KScope14 Jython ScriptingAlithya
 
Inroduction to golang
Inroduction to golangInroduction to golang
Inroduction to golangYoni Davidson
 
The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202Mahmoud Samir Fayed
 

Similar to Introduction to Go language (20)

Yeahhhh the final requirement!!!
Yeahhhh the final requirement!!!Yeahhhh the final requirement!!!
Yeahhhh the final requirement!!!
 
My final requirement
My final requirementMy final requirement
My final requirement
 
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
 
Switch case looping
Switch case loopingSwitch case looping
Switch case looping
 
Switch case and looping new
Switch case and looping newSwitch case and looping new
Switch case and looping new
 
Switch case and looping kim
Switch case and looping kimSwitch case and looping kim
Switch case and looping kim
 
Macasu, gerrell c.
Macasu, gerrell c.Macasu, gerrell c.
Macasu, gerrell c.
 
NodeJS
NodeJSNodeJS
NodeJS
 
GWT Extreme!
GWT Extreme!GWT Extreme!
GWT Extreme!
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScript
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
 
Switch case and looping jam
Switch case and looping jamSwitch case and looping jam
Switch case and looping jam
 
Mark asoi ppt
Mark asoi pptMark asoi ppt
Mark asoi ppt
 
Fundamentals of programming angeli
Fundamentals of programming angeliFundamentals of programming angeli
Fundamentals of programming angeli
 
Go 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX GoGo 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX Go
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson
 
While and For Loops
While and For LoopsWhile and For Loops
While and For Loops
 
KScope14 Jython Scripting
KScope14 Jython ScriptingKScope14 Jython Scripting
KScope14 Jython Scripting
 
Inroduction to golang
Inroduction to golangInroduction to golang
Inroduction to golang
 
The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202
 

More from Tzar Umang

Tzar-Resume-2018.pdf
Tzar-Resume-2018.pdfTzar-Resume-2018.pdf
Tzar-Resume-2018.pdfTzar Umang
 
Cloud security From Infrastructure to People-ware
Cloud security From Infrastructure to People-wareCloud security From Infrastructure to People-ware
Cloud security From Infrastructure to People-wareTzar Umang
 
Social engineering The Good and Bad
Social engineering The Good and BadSocial engineering The Good and Bad
Social engineering The Good and BadTzar Umang
 
A Different Perspective on Business with Social Data
A Different Perspective on Business with Social DataA Different Perspective on Business with Social Data
A Different Perspective on Business with Social DataTzar Umang
 
Introduction to Tensorflow
Introduction to TensorflowIntroduction to Tensorflow
Introduction to TensorflowTzar Umang
 
Social Media Analytics for the 3rd and Final Presidential Debate
Social Media Analytics for the 3rd and Final Presidential DebateSocial Media Analytics for the 3rd and Final Presidential Debate
Social Media Analytics for the 3rd and Final Presidential DebateTzar Umang
 
From Sensing to Decision
From Sensing to DecisionFrom Sensing to Decision
From Sensing to DecisionTzar Umang
 
Smart ICT Lingayen Presentation
Smart ICT Lingayen PresentationSmart ICT Lingayen Presentation
Smart ICT Lingayen PresentationTzar Umang
 
Formal Concept Analysis
Formal Concept AnalysisFormal Concept Analysis
Formal Concept AnalysisTzar Umang
 
Smart ICT extended
Smart ICT extendedSmart ICT extended
Smart ICT extendedTzar Umang
 
Cloud computing Disambiguation using Kite Model
Cloud computing Disambiguation using Kite ModelCloud computing Disambiguation using Kite Model
Cloud computing Disambiguation using Kite ModelTzar Umang
 
Business intelligence for SMEs with Data Analytics
Business intelligence for SMEs with Data AnalyticsBusiness intelligence for SMEs with Data Analytics
Business intelligence for SMEs with Data AnalyticsTzar Umang
 

More from Tzar Umang (15)

Tzar-Resume-2018.pdf
Tzar-Resume-2018.pdfTzar-Resume-2018.pdf
Tzar-Resume-2018.pdf
 
Cloud security From Infrastructure to People-ware
Cloud security From Infrastructure to People-wareCloud security From Infrastructure to People-ware
Cloud security From Infrastructure to People-ware
 
Social engineering The Good and Bad
Social engineering The Good and BadSocial engineering The Good and Bad
Social engineering The Good and Bad
 
A Different Perspective on Business with Social Data
A Different Perspective on Business with Social DataA Different Perspective on Business with Social Data
A Different Perspective on Business with Social Data
 
Introduction to Tensorflow
Introduction to TensorflowIntroduction to Tensorflow
Introduction to Tensorflow
 
Kanban
KanbanKanban
Kanban
 
Social Media Analytics for the 3rd and Final Presidential Debate
Social Media Analytics for the 3rd and Final Presidential DebateSocial Media Analytics for the 3rd and Final Presidential Debate
Social Media Analytics for the 3rd and Final Presidential Debate
 
From Sensing to Decision
From Sensing to DecisionFrom Sensing to Decision
From Sensing to Decision
 
Smart Cities
Smart CitiesSmart Cities
Smart Cities
 
Smart ICT Lingayen Presentation
Smart ICT Lingayen PresentationSmart ICT Lingayen Presentation
Smart ICT Lingayen Presentation
 
Formal Concept Analysis
Formal Concept AnalysisFormal Concept Analysis
Formal Concept Analysis
 
Smart ICT extended
Smart ICT extendedSmart ICT extended
Smart ICT extended
 
Cloud computing Disambiguation using Kite Model
Cloud computing Disambiguation using Kite ModelCloud computing Disambiguation using Kite Model
Cloud computing Disambiguation using Kite Model
 
Scrum
ScrumScrum
Scrum
 
Business intelligence for SMEs with Data Analytics
Business intelligence for SMEs with Data AnalyticsBusiness intelligence for SMEs with Data Analytics
Business intelligence for SMEs with Data Analytics
 

Recently uploaded

办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleanscorenetworkseo
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationMarko4394
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 

Recently uploaded (20)

办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleans
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentation
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 

Introduction to Go language

  • 1. Introduction to Go Language GDGDEVFESTBAGUIO -CAR 2014 UNIVERSITY OF BAGUIO TZAR C. UMANG ICT DIRECTOR –HIVE INC.
  • 2. Flow of discussion Requirements Introduction Basics Sample Deployment
  • 3. Requirements Development Software Development Kit and Test Environment You can use Appengine’sGo SDK: https://cloud.google.com/appengine/downloads Python 2.7 (please don’t use the newest version) IDE You can use Sublimetxtand notepad++ If your on the cloud you can use Github’sonline IDE Pushing files when Deploying Git: http://git-scm.com
  • 4. Requirements Development Servers Highly recommend Google’s Appenginefor Go Language You can also use Openshift’sGo Language Environment, but you will not have access to Appengine’sfunctionalities Deployment You can use Appengine+ Cloudcomputeof Google Or OpenshiftBig Gear
  • 5. Young Language Created by: Robert Griesemer, Ken Thompson, and Rob Pike (Googlers) in late 2007 Brought to public in 2009 A new systems programming languagefor the past 10 years + It is fastto develop, compileand run Answer to hardware’s limitations today, yet future proofing your system, where the language handles routine and memory management Funand Easymaking developmentmore productiveand we don’t use semicolons “;” Uses goroutines, a lightweight communicating processes and its concurrent, multiplexing of it onto threads is done automatically Has a good garbage collection, it is efficient and low in latency
  • 6. Basics -“Hello World” package helloworld import ( "fmt" "net/http" //http handler package ) funcinit() { http.HandleFunc("/", handle) } funchandle(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, "<html><body><b>Hello World</b></body></html>") }
  • 7. Basics Comments Uses /**/ or // // for line by line comment /**/ for large chunk disabling of function or a big header credit on your code
  • 8. Basics Formatting Indention is just like any other IDE for any PL tab works for them gofmthandles alignment on you code Parenthesis Go uses lesser parenthesis Structures like if, for and switch don’t require it Operator precedence hierarchy is shorter and clearer x<<8 + y<<16 //spaces implies what it means
  • 9. Basics Semicolons “ ; “ We don’t usually use it to terminate a line just like python Mostly used to separate clauses of for –loops and the like Making codes cleaner on the eye
  • 10. Basics If –statement It looks as simple as this if a > 1 { return b } It also accept initialization statements, to setup a local variable if err := datastore.Get(c, key, &b); err != nil { return err }
  • 11. Basics Loop Unified for and while, there is no do-while For for init; condition; post { } While for condition { } For(;;) for { } No comma operator and “+ +” and “--” are statements not expression //Reversea fori,j:=0,len(a)1;i<j;i,j=i+1,j1{ a[i],a[j]=a[j],a[i] } To run multiple variables you need to use assignments
  • 12. Basics Switch Go uses a more general implementation of switches Expressions don’t need to be constants or even integers Cases are evaluated top to bottom until a match is found And if switch has no statement it switches to “true” Making it possible to write if-else-if-else-if-else chain as a switch
  • 13. Basics Switch funcunhex(cbyte)byte{ switch{ case'0'<=c&&c<='9': returnc'0' case'a'<=c&&c<='f': returnc'a'+10 case'A'<=c&&c<='F': returnc'A'+10 } return0 }
  • 14. Basics Switch Cases can be presented into commas as well funcrunOver(cbyte)bool{ switchc{ case'','?','&','=','#','+','%': returntrue } returnfalse }
  • 15. Basics Types It uses the regular int, float, string Booleans (&& “and”, || “or”, ! “not”) Explicitly sized typesthe likes of int8, float64 Unsigned integers, uint, uint32
  • 16. Basics Strings It is built in, these are immutable values not just arrays of bytes values. You can’t change a string variable once it is built Though you can use snippets to change or to reassign string variables s:="hello" ifs[1]!='e'{os.Exit(1)} s="goodbye" varp*string=&s *p="ciao"
  • 17. Basics Arrays Declared this way vararrayOfInt[10]int; They are like strings with values though mutable Arrays holds values in Go making it as meaningful as a string, not like with other language such as C where arrays are pointers
  • 18. Basics Pointers We have them but they are limited No pointer arithmetic Easier for garbage collection
  • 19. Basics Database supported MySQL, Oracle, DB2 MongoDB, NoSQL Mobile App Delivery Supported Platform and Framework (Based on our testing) Intel XDK Phonegap
  • 20. Basics Libraries OS, I/O, files math (sin(x) etc.) strings, Unicode, regular expressions reflection command-line flags, logging hashes, crypto testing (plus testing tool, gotest) networking, HTTP, RPC HTML (and more general) templates And growing… Documentation and complete list here: http://golang.org
  • 21. Other Resources http://golang.org/pkg/ (package docs) http://golang.org/src/ (source code)
  • 22. Requirements Development Software Development Kit You can use Appengine’sGo SDK: https://cloud.google.com/appengine/downloads Python 2.7 (please don’t use the newest version) IDE You can use Sublimetxtand notepad++ If your on the cloud you can use Github’sonline IDE Pushing files Git: http://git-scm.com
  • 23. Requirements Development Servers Highly recommend Google’s Appenginefor Go Language You can also Openshift’sGo Language Environment, but you will not have access to Appengine’sfunctionalities Deployment You can use Appengine+ Cloudcomputeof Google Or OpenshiftBig Gear
  • 24. THANK YOU!!! For Questions and Tutorials you may join the group “Philippine Gophers” in FB and G+ Or add me in: fb.com/tzarumang twitter.com/definitelytzar plus.google.com/tzarumang Presentation is based from: golang.org Chris Lupo’sThe Go Programming Language