SlideShare a Scribd company logo
Suelen Goularte Carvalho
suelengc@ime.usp.br
Computação Paralela e Distribuída
Profº Alfredo Goldman
Junho/2015
Go is a programming language
designed by Google to help
solve Google's problems.
What is Go?
And has big
problems!
Which (big) problems?
● Hardware is big and the software is big
● There are many millions of lines of software
● Servers mostly in C++ and lots of Java and Python
● Thousands of engineers work on the code
● And of course, all this software runs on zillions of
machines.
In short, development at
is big, can be slow, and is often
clumsy. But it is effective.
''
''
https://talks.golang.org/2012/splash.article

Recommended for you

Golang
GolangGolang
Golang

Go is an open source programming language designed by Google to be concurrent, garbage collected, and efficient. It has a simple syntax and is used by Google and others to build large distributed systems. Key features include garbage collection, concurrency with goroutines and channels, interfaces without inheritance, and a large standard library.

googlegolanggo
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)

This document provides an overview of the Go programming language. It discusses that Go was initially developed at Google in 2007 and is now an open source language used by many companies. The document then covers Why Go is useful, including its memory management, concurrency support, and cross-platform capabilities. It also summarizes some of Go's basic syntax like packages, functions, variables, types, and control structures. Finally, it discusses some key Go concepts like methods, interfaces, channels, and the net/http package.

programminggolangbasic go
Go language presentation
Go language presentationGo language presentation
Go language presentation

The document discusses the Go programming language and why it was created. It provides several key points: - Go was created over a decade since a new major systems language emerged, and the computing landscape has changed significantly in areas like software development speed, dependency management, type systems, garbage collection, and parallelism. - Go aims to address these changes with a compiled, garbage-collected language that provides fast compilation, easy dependency analysis, lightweight static types, built-in support for concurrency and communication on multicore systems. - Some of Go's guiding principles in design were to reduce typing, clutter, and complexity while avoiding forward declarations and header files everything is declared once without type hierarchies.

google languagestructured languagestatic language
A lot of others people
help to bring go from
prototype to reality.
Go became a public
Open Source
project.
https://golang.org/doc/faq#history
2008 2009 20102007
Starts to have
adoption by other
programmers
Started and built by
Robert Griesemer,
Rob Pike and Ken
Thompson as a
part-time project.
History
● Ken Thompson (B, C, Unix, UTF-8)
● Rob Pike (Unix, UTF-8)
● Robert Griesemer (Hotspot, JVM)
...and a few others engineers at Google
Who were the founders?
2013 20142012
Version history
Go 1.4 (December)
Go 1.3 (June)
Go 1 (March)
Go 1.2 (December)
Go 1.1 (May)
https://golang.org/project/
● Eliminate slowness
● Eliminate clumsiness
● Improve productive
● Maintain (and improve) scale
It was designed by and for people who write, read,
debug and maintain large software systems.
Go's purpose is not to do research programming
language design.
Go's purpose is to make its designers' programming
lives better.
Why Go?

Recommended for you

GO programming language
GO programming languageGO programming language
GO programming language

This document provides an outline on learning the Go programming language. It discusses Go's history as a language developed by Google in 2007. Key features include being statically typed with garbage collection and support for concurrency. The document outlines disadvantages like Go still being a young language. It provides guidance on setting up a Go environment and learning basics like types, variables, functions, control structures, object orientation, and concurrency using goroutines and channels.

googlegogolang
GoLang Introduction
GoLang IntroductionGoLang Introduction
GoLang Introduction

Go is a statically-typed, compiled programming language developed by Google. It aims for fast build times and single binary deployments. Go emphasizes concurrency through lightweight goroutines and channels for communication between them. While it lacks some object-oriented features like inheritance, it provides built-in support for concurrency and parallelism which makes it well-suited for backend services, network applications, and processing large amounts of data.

technologyengineeringgoogle
Go. Why it goes
Go. Why it goesGo. Why it goes
Go. Why it goes

New language from Google, static safe compiler, with GC and as fast as C++ or Java, syntax simpler then Python - 2 hour-long tutorial and you can start code. In this talk Serhii will talk about Go, also known as Golang – an open source language developed at Google and used in production by companies such as Docker, Dropbox, Facebook and Google itself. Go is now heavily used as a general-purpose programming language that’s a pleasure to use and maintain. This introductory talk contains many live demos of basic language concepts, concurrency model, simple HTTP-based endpoint implementation and, of course, tests using build-in framework. This presentation will be interesting for backend engineers and DevOps to understand why Go had become so popular and how it might help to build robust and maintanable services. Agenda of the presentation: 1. Go is not C, not Java, not anything 2. Rob Pike argument 3. Main ideas and basics 4. Concurrency model 5. Tools 6. Issues

gogolang
Go is a compiled, concurrent,
garbage-collected, statically typed
language developed at .
What is Go?
fix, fmt, get, install, list, tool,
version, vet.
build compile packages and dependencies
run compile and run Go program
clean remove object files
env print Go environment information
test test packages and benchmarks
Go is a tool for managing Go source code...
Mainly tools:
Others tools:
Who are using today?
https://github.com/golang/go/wiki/GoUsers
❏ Compiled
❏ Garbage-collected
❏ Has your own runtime
❏ Simple syntax
❏ Great standard library
❏ Cross-platform
❏ Object Oriented (without inheritance)
❏ Statically and stronger typed
❏ Concurrent (goroutines)
❏ Closures
❏ Explicity dependencies
❏ Multiple return values
❏ Pointers
❏ and so on...
What will you see in Go?

Recommended for you

Golang 101
Golang 101Golang 101
Golang 101

The document provides an introduction to the Go programming language. Some key points: - Go was designed by Google to handle large scale software development with thousands of developers and machines. It focuses on concurrency, simplicity, and reliability. - Some core features of Go include goroutines for lightweight threads, channels for communication between goroutines, and interfaces for abstraction. - Go aims to compile quickly to machine code for performance and packages into single binaries for easy deployment. - The document demonstrates building a basic web server in Go and encourages hands-on learning through its tour and examples.

golang
Go Lang Tutorial
Go Lang TutorialGo Lang Tutorial
Go Lang Tutorial

- Go is a programming language created at Google. It is fast, statically typed, and has garbage collection. - The tutorial covers Go's history, why it was created, library support, and provides examples of variables, functions, flow control, methods, interfaces, and goroutines. - The document includes an outline, code examples throughout to demonstrate the concepts, and references additional resources for learning Go.

goprogramming language
Golang getting started
Golang getting startedGolang getting started
Golang getting started

Go is a statically-typed, garbage-collected programming language that is fast, supports concurrency, and has built-in support for remote package management. It is well-suited for building network servers and applications with non-blocking I/O. The document provides examples of writing a simple "Hello World" program, building a basic HTTP server, and using goroutines for concurrency. It also outlines how to install Go, set up a development environment, and find additional learning resources.

Have not been implemented in
favor of efficiency.
❏ Exception handling
❏ Inheritance
❏ Generics
❏ Assert
❏ Method overload
What will you not
see in Go?
see a bit of code!
Packages
● Each Go program are compound per packages
● Programs starts from main package
● This example are using the ftm and math packages
$ go run packages.go
My favorite number is 1
● The var instruction declares a list of variables
● The type is informed at the end
● The var instruction could be in a package or in a function
● The var instruction could includes initializers, 1 per variable. In
this case, the type could be ommited because it will be inferred
Variables
$ go run variables.go
0 false false false
$ go run variables-with-initiali
1 2 true false no!

Recommended for you

Go Language presentation
Go Language presentationGo Language presentation
Go Language presentation

Go is a compiled, concurrent, garbage-collected, statically typed language developed at Google in 2007 to address issues with large software systems. It was created to facilitate easy memory management, enable rapid compilation, and handle concurrency through built-in goroutines and channels. Many large companies now use Go for its improved developer productivity compared to other languages.

golangprogramminglanguage
Concurrency With Go
Concurrency With GoConcurrency With Go
Concurrency With Go

A talk I gave at the Golang TO Meetup. Highlighting the beautiful powers of Go with respect to concurrency, and writing concurrent programs using it. Code at: github.com/jsimnz/concurrency-talk

concurrencygogolang
Goroutines and Channels in practice
Goroutines and Channels in practiceGoroutines and Channels in practice
Goroutines and Channels in practice

Goroutines and channels are Go's approach to concurrency. Goroutines are lightweight threads that are scheduled by the Go runtime instead of the OS kernel. Channels allow goroutines to communicate by passing messages. This makes sharing state easier than with traditional threads. Common concurrency problems like deadlocks can still occur, so the Go race detector tool helps find issues. Overall, Go's model embraces concurrency through goroutines and channels, but care must still be taken to avoid problems.

gogolangconcurrency
$ go run constants.go
Hello world! Happy 3.14 Day! Go rules?
true
● Constants are declared like variables but with keyword const
● Can not use the syntx :=
Constants
● Inside a function, the short attribution instruction :=
can be used instead of a var declaration
Short variables declarations
$ go run short-variable-declarations.go
1 2 3 true false no!
Functions
● Functions could have zero or more arguments
● Notice that the type comes after the parameter name,
like variables
$ go run functions.go
55
● A function can have multiple return values
Multiple return values
$ go run multiple-results.go
world hello

Recommended for you

Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang

* What are Microservices? * Why Microservices? * Golang Introduction * Golang Testing Tool * Golang Deployment with Docker

dockergolangmicroservices
golang_getting_started.pptx
golang_getting_started.pptxgolang_getting_started.pptx
golang_getting_started.pptx

Go is a statically typed, compiled programming language designed at Google in 2007 to improve programming productivity for multicore and networked machines. It addresses criticisms of other languages used at Google while keeping useful characteristics like C's performance, Python's readability, and support for high-performance networking and multiprocessing. Go is syntactically similar to C but adds memory safety, garbage collection, and CSP-style concurrency. There are two major implementations that target multiple platforms including WebAssembly. Go aims to guarantee that code written for one version will continue to build and run with future versions.

golanggosoftware engineering
Introduction to go language programming
Introduction to go language programmingIntroduction to go language programming
Introduction to go language programming

Introduction to go language programming , benchmark with another language programming nodejs , php , ruby & python . how install go . use what IDE . and rapid learnin golang

functionlearninggo
● Go has just for as looping structure
● It is very similar with C or Java code, except for ( )
● Start and end declarations can be empty
Looping For
$ go run for.go
45
$ go run for-continu
1024
$ go run for-is-go-while.go
1024
● Semicolon can be removed and you will have while
● for can run forever
Looping "while" and forever
$ go run forever.go
process took too long
● It is very similar with C or Java code, except for ( )
if Condition
$ go run if.go
1.4142135623730951 2i
$ go run switch.go
Go runs on nacl.
● It is very similar with C or Java code, except for ( )
Switch Condition

Recommended for you

Golang workshop
Golang workshopGolang workshop
Golang workshop

The program uses a for loop to iterate from 1 to 100. Inside the loop, it uses if/else conditions to check if the number is divisible by 3, 5, or both and prints the corresponding string. If none of the conditions are met, it prints the number.

golanggogoogle
An introduction to programming in Go
An introduction to programming in GoAn introduction to programming in Go
An introduction to programming in Go

Go is an open source programming language developed at Google to build simple, reliable and efficient software. It is a compiled, concurrent language that makes it easy to build scalable network and web applications. Some key features of Go include garbage collection, static typing, concurrency support with goroutines, and a large standard library. Go aims to combine the efficiency and speed of compiled languages like C with the simplicity and ease of dynamic languages.

programminggogolang
go language- haseeb.pptx
go language- haseeb.pptxgo language- haseeb.pptx
go language- haseeb.pptx

Go is a programming language designed by Google to help solve Google's problems of developing large, complex software systems involving huge amounts of code and running on many machines. It was created to be compiled, concurrent using lightweight threads (goroutines) and communicate through channels, garbage collected, and have a simple syntax. Some key features include being statically typed, having good standard libraries, and being cross-platform while also eliminating issues like slowness and clumsiness in large codebases. It began as an internal project at Google in 2007 and became publicly available as open source in 2009.

googlemongodblanguage
$ go run defer.go
hello world
Defer
● Postponing the execution of a function until the function returns
● The arguments of the deferred calls are evaluated immediately
What more?
● Pointer
● Struct
● Matrix
● Slice
● Range
● Map
● Value function
● Closures
● Method
● Interface
● Stringer
● Error
● and a lot of more!!!
http://go-tour-br.appspot.com
$ go run http.go
A web server
● It is just simple to build a web server with 15 lines or less!!
Could you belive that???
● To execute a goroutine, just go!
● To send or receive information between the
goroutines, use channels
● Use the GOMAXPROCS environment variable to
define the amount of threads
Concurrency (goroutines)

Recommended for you

Go fundamentals
Go fundamentalsGo fundamentals
Go fundamentals

The document provides an overview of the Go programming language including its guiding principles, syntax, concurrency model, and examples of usage. It discusses that Go was created at Google in 2007 to have better support for concurrency and scalability compared to other languages. It emphasizes simplicity, readability, and minimalism in design. Go uses goroutines and channels for concurrency where goroutines are lightweight threads and channels allow goroutines to communicate without shared memory. Examples demonstrate basic syntax, goroutines, and using channels for patterns like ping-pong.

Golang
GolangGolang
Golang

Go is a compiled, concurrent, garbage-collected programming language developed at Google. It aims to combine the performance and low-level access of compiled languages with the ease of use of scripting languages. Some key features of Go include its simple syntax, static and strong typing, concurrency support through goroutines and channels, and automatic memory management through garbage collection. Go is used by many companies and has a large standard library, though it lacks some common features like inheritance.

golanggoprogramming
Go, meet Lua
Go, meet LuaGo, meet Lua
Go, meet Lua

Slides for a presentation given at the Go MN meetup https://www.meetup.com/golangmn/ given on 4/15/2020. The associated code is available at https://github.com/andreburgaud/meetup-golang-lua. The topic is about the interoperability between Go and Lua, or Lua and Go.

ccgogo
$ go run goroutines.go
hello
world
hello
world
hello
world
hello
world
hello
● A goroutine is a lightweight thread managed by Go runtime
Goroutines
$ go run channels.go
17 -5 12
Channels
● Channels are typed's conduit through which you can send and receive
values with the channel operator <-
Unbuffered Channels
http://www.goinggo.net/2014/02/the-nature-of-channels-in-go.html
c := make (chan int)
Buffered Channels
http://www.goinggo.net/2014/02/the-nature-of-channels-in-go.html
c := make (chan int, 10)

Recommended for you

Golang preso
Golang presoGolang preso
Golang preso

This document compares Go and Python programming languages. It notes that while they share some similarities like being able to be imperative or object-oriented, having multiple return values from functions, and package management, they also have key differences. Go is compiled, strongly typed, and has concurrency built into its runtime via goroutines and channels, while Python uses threads and has a Global Interpreter Lock. The document provides examples of using goroutines, defer, wait groups, and channels for concurrency in Go.

Why Go Lang?
Why Go Lang?Why Go Lang?
Why Go Lang?

Go is used for many popular projects like Kubernetes, Docker, Prometheus, and Ethereum due to its advantages like being statically compiled, allowing for easy distribution and parallelism. Google migrated its dl.google.com download service from C++ to Go because the Go version was much less code, more readable, testable, and fixed HTTP issues while having equal or better performance. Go's creators aimed to design a language that is simple yet powerful for building reliable and efficient software in the modern era.

golanggo
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy Code

The document discusses strategies for working with legacy code, which is code inherited from previous developers or older versions that often lacks tests and good documentation. It defines legacy code and outlines challenges like poor structure, dependencies, and lack of tests. It then provides approaches for modifying legacy code like identifying what to change and test, breaking dependencies, writing tests, and refactoring code in small, tested increments. Specific tactics are presented like using seams, sprouting methods, and interfaces to break dependencies and allow testing legacy code. The importance of understanding the system and increasing test coverage before making changes is emphasized.

Now you are ready to
!
Bibliografia
❏ http://golang.org
❏ http://go-tour-br.appspot.com/
❏ https://tour.golang.org
❏ http://www.golangbr.org/
❏ https://vimeo.com/49718712
❏ http://gophercon.com
❏ http://www.infoq.com/br/news/2014/09/go-1-3
❏ http://www.casadocodigo.com.br/products/livro-google-go
❏ https://pt.wikipedia.org/wiki/Inferno_(sistema_operacional)
❏ http://www.grokpodcast.com/series/a-linguagem-go/
❏ https://pt.wikipedia.org/wiki/Go_(linguagem_de_programação)
❏ https://gobyexample.com
❏ http://www.goinggo.net/2014/02/the-nature-of-channels-in-go.html
❏ http://www.goinggo.net/2013/09/detecting-race-conditions-with-go.html?m=1
❏ https://en.wikipedia.org/wiki/Green_threads
❏ http://www.toptal.com/go/go-programming-a-step-by-step-introductory-tutorial
Questions?

More Related Content

What's hot

Introduction to Go programming language
Introduction to Go programming languageIntroduction to Go programming language
Introduction to Go programming language
Slawomir Dorzak
 
Golang
GolangGolang
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by Google
Uttam Gandhi
 
Golang
GolangGolang
Golang
Felipe Mamud
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)
Ishin Vin
 
Go language presentation
Go language presentationGo language presentation
Go language presentation
paramisoft
 
GO programming language
GO programming languageGO programming language
GO programming language
tung vu
 
GoLang Introduction
GoLang IntroductionGoLang Introduction
GoLang Introduction
Spandana Govindgari
 
Go. Why it goes
Go. Why it goesGo. Why it goes
Go. Why it goes
Sergey Pichkurov
 
Golang 101
Golang 101Golang 101
Golang 101
宇 傅
 
Go Lang Tutorial
Go Lang TutorialGo Lang Tutorial
Go Lang Tutorial
Wei-Ning Huang
 
Golang getting started
Golang getting startedGolang getting started
Golang getting started
Harshad Patil
 
Go Language presentation
Go Language presentationGo Language presentation
Go Language presentation
Gh-Mohammed Eldadah
 
Concurrency With Go
Concurrency With GoConcurrency With Go
Concurrency With Go
John-Alan Simmons
 
Goroutines and Channels in practice
Goroutines and Channels in practiceGoroutines and Channels in practice
Goroutines and Channels in practice
Guilherme Garnier
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
Bo-Yi Wu
 
golang_getting_started.pptx
golang_getting_started.pptxgolang_getting_started.pptx
golang_getting_started.pptx
Guy Komari
 
Introduction to go language programming
Introduction to go language programmingIntroduction to go language programming
Introduction to go language programming
Mahmoud Masih Tehrani
 
Golang workshop
Golang workshopGolang workshop
Golang workshop
Victor S. Recio
 
An introduction to programming in Go
An introduction to programming in GoAn introduction to programming in Go
An introduction to programming in Go
David Robert Camargo de Campos
 

What's hot (20)

Introduction to Go programming language
Introduction to Go programming languageIntroduction to Go programming language
Introduction to Go programming language
 
Golang
GolangGolang
Golang
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by Google
 
Golang
GolangGolang
Golang
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)
 
Go language presentation
Go language presentationGo language presentation
Go language presentation
 
GO programming language
GO programming languageGO programming language
GO programming language
 
GoLang Introduction
GoLang IntroductionGoLang Introduction
GoLang Introduction
 
Go. Why it goes
Go. Why it goesGo. Why it goes
Go. Why it goes
 
Golang 101
Golang 101Golang 101
Golang 101
 
Go Lang Tutorial
Go Lang TutorialGo Lang Tutorial
Go Lang Tutorial
 
Golang getting started
Golang getting startedGolang getting started
Golang getting started
 
Go Language presentation
Go Language presentationGo Language presentation
Go Language presentation
 
Concurrency With Go
Concurrency With GoConcurrency With Go
Concurrency With Go
 
Goroutines and Channels in practice
Goroutines and Channels in practiceGoroutines and Channels in practice
Goroutines and Channels in practice
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
 
golang_getting_started.pptx
golang_getting_started.pptxgolang_getting_started.pptx
golang_getting_started.pptx
 
Introduction to go language programming
Introduction to go language programmingIntroduction to go language programming
Introduction to go language programming
 
Golang workshop
Golang workshopGolang workshop
Golang workshop
 
An introduction to programming in Go
An introduction to programming in GoAn introduction to programming in Go
An introduction to programming in Go
 

Similar to Go lang

go language- haseeb.pptx
go language- haseeb.pptxgo language- haseeb.pptx
go language- haseeb.pptx
ArsalanMaqsood1
 
Go fundamentals
Go fundamentalsGo fundamentals
Go fundamentals
Ron Barabash
 
Golang
GolangGolang
Golang
Saray Chak
 
Go, meet Lua
Go, meet LuaGo, meet Lua
Go, meet Lua
Andre Burgaud
 
Golang preso
Golang presoGolang preso
Golang preso
Christopher Foresman
 
Why Go Lang?
Why Go Lang?Why Go Lang?
Why Go Lang?
Sathish VJ
 
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy Code
Andrea Polci
 
How go makes us faster (May 2015)
How go makes us faster (May 2015)How go makes us faster (May 2015)
How go makes us faster (May 2015)
Wilfried Schobeiri
 
Me&g@home
Me&g@home Me&g@home
Me&g@home
Vytautas Dauksa
 
Ruby, the language of devops
Ruby, the language of devopsRuby, the language of devops
Ruby, the language of devops
Rob Kinyon
 
Improve the deployment process step by step
Improve the deployment process step by stepImprove the deployment process step by step
Improve the deployment process step by step
Daniel Fahlke
 
Mender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and GolangMender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io
 
Passing the Joel Test in the PHP World (phpbnl10)
Passing the Joel Test in the PHP World (phpbnl10)Passing the Joel Test in the PHP World (phpbnl10)
Passing the Joel Test in the PHP World (phpbnl10)
Lorna Mitchell
 
Golang nuts (by Nii Nai at DevCongress 2013)
Golang nuts (by Nii Nai at DevCongress 2013)Golang nuts (by Nii Nai at DevCongress 2013)
Golang nuts (by Nii Nai at DevCongress 2013)
DevCongress
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
Simon Hewitt
 
JavaScript From Hell - CONFidence 2.0 2009
JavaScript From Hell - CONFidence 2.0 2009JavaScript From Hell - CONFidence 2.0 2009
JavaScript From Hell - CONFidence 2.0 2009
Mario Heiderich
 
Golang (Go Programming Language)
Golang (Go Programming Language)Golang (Go Programming Language)
Golang (Go Programming Language)
ShubhamMishra485
 
TDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaTDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and Gomega
Eddy Reyes
 
API Design
API DesignAPI Design
API Design
Tim Boudreau
 
Java vs. C/C++
Java vs. C/C++Java vs. C/C++
Java vs. C/C++
Azul Systems Inc.
 

Similar to Go lang (20)

go language- haseeb.pptx
go language- haseeb.pptxgo language- haseeb.pptx
go language- haseeb.pptx
 
Go fundamentals
Go fundamentalsGo fundamentals
Go fundamentals
 
Golang
GolangGolang
Golang
 
Go, meet Lua
Go, meet LuaGo, meet Lua
Go, meet Lua
 
Golang preso
Golang presoGolang preso
Golang preso
 
Why Go Lang?
Why Go Lang?Why Go Lang?
Why Go Lang?
 
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy Code
 
How go makes us faster (May 2015)
How go makes us faster (May 2015)How go makes us faster (May 2015)
How go makes us faster (May 2015)
 
Me&g@home
Me&g@home Me&g@home
Me&g@home
 
Ruby, the language of devops
Ruby, the language of devopsRuby, the language of devops
Ruby, the language of devops
 
Improve the deployment process step by step
Improve the deployment process step by stepImprove the deployment process step by step
Improve the deployment process step by step
 
Mender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and GolangMender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and Golang
 
Passing the Joel Test in the PHP World (phpbnl10)
Passing the Joel Test in the PHP World (phpbnl10)Passing the Joel Test in the PHP World (phpbnl10)
Passing the Joel Test in the PHP World (phpbnl10)
 
Golang nuts (by Nii Nai at DevCongress 2013)
Golang nuts (by Nii Nai at DevCongress 2013)Golang nuts (by Nii Nai at DevCongress 2013)
Golang nuts (by Nii Nai at DevCongress 2013)
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
JavaScript From Hell - CONFidence 2.0 2009
JavaScript From Hell - CONFidence 2.0 2009JavaScript From Hell - CONFidence 2.0 2009
JavaScript From Hell - CONFidence 2.0 2009
 
Golang (Go Programming Language)
Golang (Go Programming Language)Golang (Go Programming Language)
Golang (Go Programming Language)
 
TDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaTDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and Gomega
 
API Design
API DesignAPI Design
API Design
 
Java vs. C/C++
Java vs. C/C++Java vs. C/C++
Java vs. C/C++
 

More from Suelen Carvalho

Porque Métodos Ágeis não é pra você!
Porque Métodos Ágeis não é pra você!Porque Métodos Ágeis não é pra você!
Porque Métodos Ágeis não é pra você!
Suelen Carvalho
 
Scrum: Relembrando os por quês?
Scrum: Relembrando os por quês?Scrum: Relembrando os por quês?
Scrum: Relembrando os por quês?
Suelen Carvalho
 
Techtrends xp desafios da agilidade com trabalho remoto
Techtrends xp   desafios da agilidade com trabalho remotoTechtrends xp   desafios da agilidade com trabalho remoto
Techtrends xp desafios da agilidade com trabalho remoto
Suelen Carvalho
 
Introdução a Kotlin
Introdução a KotlinIntrodução a Kotlin
Introdução a Kotlin
Suelen Carvalho
 
Introdução a Android Instant Apps
Introdução a Android Instant AppsIntrodução a Android Instant Apps
Introdução a Android Instant Apps
Suelen Carvalho
 
Google IO'17
Google IO'17Google IO'17
Google IO'17
Suelen Carvalho
 
Construindo Times de Alta Performance - Produtos & Engenharia
Construindo Times de Alta Performance - Produtos & EngenhariaConstruindo Times de Alta Performance - Produtos & Engenharia
Construindo Times de Alta Performance - Produtos & Engenharia
Suelen Carvalho
 
Git Merge e Rebase - The goal and differences
Git Merge e Rebase - The goal and differencesGit Merge e Rebase - The goal and differences
Git Merge e Rebase - The goal and differences
Suelen Carvalho
 
Dynamic Programming and Reinforcement Learning applied to Tetris Game
Dynamic Programming and Reinforcement Learning applied to Tetris GameDynamic Programming and Reinforcement Learning applied to Tetris Game
Dynamic Programming and Reinforcement Learning applied to Tetris Game
Suelen Carvalho
 
Desenvolvimento de Novos Líderes - Paidéia Educação
Desenvolvimento de Novos Líderes - Paidéia EducaçãoDesenvolvimento de Novos Líderes - Paidéia Educação
Desenvolvimento de Novos Líderes - Paidéia Educação
Suelen Carvalho
 
O sucesso do seu app está nos detalhes!
O sucesso do seu app está nos detalhes!O sucesso do seu app está nos detalhes!
O sucesso do seu app está nos detalhes!
Suelen Carvalho
 
Supporting Coding and Testing
Supporting Coding and TestingSupporting Coding and Testing
Supporting Coding and Testing
Suelen Carvalho
 
Intercon Android 2014 - Google Play In App Billing
Intercon Android 2014 - Google Play In App BillingIntercon Android 2014 - Google Play In App Billing
Intercon Android 2014 - Google Play In App Billing
Suelen Carvalho
 
Semana da Computação USP São Carlos 2014 - Carreira Mobile
Semana da Computação USP São Carlos 2014 - Carreira MobileSemana da Computação USP São Carlos 2014 - Carreira Mobile
Semana da Computação USP São Carlos 2014 - Carreira Mobile
Suelen Carvalho
 
TDC 2014 - Tudo sobre GCM Push Notifications
TDC 2014 - Tudo sobre GCM Push NotificationsTDC 2014 - Tudo sobre GCM Push Notifications
TDC 2014 - Tudo sobre GCM Push Notifications
Suelen Carvalho
 
Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...
Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...
Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...
Suelen Carvalho
 
Conexao Java - Sua primeira app Android
Conexao Java - Sua primeira app AndroidConexao Java - Sua primeira app Android
Conexao Java - Sua primeira app Android
Suelen Carvalho
 
7 Masters sobre Android
7 Masters sobre Android7 Masters sobre Android
7 Masters sobre Android
Suelen Carvalho
 
A história do surgimento da plataforma móvel Android.
A história do surgimento da plataforma móvel Android.A história do surgimento da plataforma móvel Android.
A história do surgimento da plataforma móvel Android.
Suelen Carvalho
 
O fantástico mundo de Android
O fantástico mundo de AndroidO fantástico mundo de Android
O fantástico mundo de Android
Suelen Carvalho
 

More from Suelen Carvalho (20)

Porque Métodos Ágeis não é pra você!
Porque Métodos Ágeis não é pra você!Porque Métodos Ágeis não é pra você!
Porque Métodos Ágeis não é pra você!
 
Scrum: Relembrando os por quês?
Scrum: Relembrando os por quês?Scrum: Relembrando os por quês?
Scrum: Relembrando os por quês?
 
Techtrends xp desafios da agilidade com trabalho remoto
Techtrends xp   desafios da agilidade com trabalho remotoTechtrends xp   desafios da agilidade com trabalho remoto
Techtrends xp desafios da agilidade com trabalho remoto
 
Introdução a Kotlin
Introdução a KotlinIntrodução a Kotlin
Introdução a Kotlin
 
Introdução a Android Instant Apps
Introdução a Android Instant AppsIntrodução a Android Instant Apps
Introdução a Android Instant Apps
 
Google IO'17
Google IO'17Google IO'17
Google IO'17
 
Construindo Times de Alta Performance - Produtos & Engenharia
Construindo Times de Alta Performance - Produtos & EngenhariaConstruindo Times de Alta Performance - Produtos & Engenharia
Construindo Times de Alta Performance - Produtos & Engenharia
 
Git Merge e Rebase - The goal and differences
Git Merge e Rebase - The goal and differencesGit Merge e Rebase - The goal and differences
Git Merge e Rebase - The goal and differences
 
Dynamic Programming and Reinforcement Learning applied to Tetris Game
Dynamic Programming and Reinforcement Learning applied to Tetris GameDynamic Programming and Reinforcement Learning applied to Tetris Game
Dynamic Programming and Reinforcement Learning applied to Tetris Game
 
Desenvolvimento de Novos Líderes - Paidéia Educação
Desenvolvimento de Novos Líderes - Paidéia EducaçãoDesenvolvimento de Novos Líderes - Paidéia Educação
Desenvolvimento de Novos Líderes - Paidéia Educação
 
O sucesso do seu app está nos detalhes!
O sucesso do seu app está nos detalhes!O sucesso do seu app está nos detalhes!
O sucesso do seu app está nos detalhes!
 
Supporting Coding and Testing
Supporting Coding and TestingSupporting Coding and Testing
Supporting Coding and Testing
 
Intercon Android 2014 - Google Play In App Billing
Intercon Android 2014 - Google Play In App BillingIntercon Android 2014 - Google Play In App Billing
Intercon Android 2014 - Google Play In App Billing
 
Semana da Computação USP São Carlos 2014 - Carreira Mobile
Semana da Computação USP São Carlos 2014 - Carreira MobileSemana da Computação USP São Carlos 2014 - Carreira Mobile
Semana da Computação USP São Carlos 2014 - Carreira Mobile
 
TDC 2014 - Tudo sobre GCM Push Notifications
TDC 2014 - Tudo sobre GCM Push NotificationsTDC 2014 - Tudo sobre GCM Push Notifications
TDC 2014 - Tudo sobre GCM Push Notifications
 
Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...
Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...
Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...
 
Conexao Java - Sua primeira app Android
Conexao Java - Sua primeira app AndroidConexao Java - Sua primeira app Android
Conexao Java - Sua primeira app Android
 
7 Masters sobre Android
7 Masters sobre Android7 Masters sobre Android
7 Masters sobre Android
 
A história do surgimento da plataforma móvel Android.
A história do surgimento da plataforma móvel Android.A história do surgimento da plataforma móvel Android.
A história do surgimento da plataforma móvel Android.
 
O fantástico mundo de Android
O fantástico mundo de AndroidO fantástico mundo de Android
O fantástico mundo de Android
 

Recently uploaded

20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
Matthew Sinclair
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
ScyllaDB
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
Safe Software
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
Enterprise Wired
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
BookNet Canada
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Erasmo Purificato
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Bert Blevins
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
ArgaBisma
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
Matthew Sinclair
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 

Recently uploaded (20)

20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 

Go lang

  • 1. Suelen Goularte Carvalho suelengc@ime.usp.br Computação Paralela e Distribuída Profº Alfredo Goldman Junho/2015
  • 2. Go is a programming language designed by Google to help solve Google's problems. What is Go? And has big problems!
  • 3. Which (big) problems? ● Hardware is big and the software is big ● There are many millions of lines of software ● Servers mostly in C++ and lots of Java and Python ● Thousands of engineers work on the code ● And of course, all this software runs on zillions of machines.
  • 4. In short, development at is big, can be slow, and is often clumsy. But it is effective. '' '' https://talks.golang.org/2012/splash.article
  • 5. A lot of others people help to bring go from prototype to reality. Go became a public Open Source project. https://golang.org/doc/faq#history 2008 2009 20102007 Starts to have adoption by other programmers Started and built by Robert Griesemer, Rob Pike and Ken Thompson as a part-time project. History
  • 6. ● Ken Thompson (B, C, Unix, UTF-8) ● Rob Pike (Unix, UTF-8) ● Robert Griesemer (Hotspot, JVM) ...and a few others engineers at Google Who were the founders?
  • 7. 2013 20142012 Version history Go 1.4 (December) Go 1.3 (June) Go 1 (March) Go 1.2 (December) Go 1.1 (May) https://golang.org/project/
  • 8. ● Eliminate slowness ● Eliminate clumsiness ● Improve productive ● Maintain (and improve) scale It was designed by and for people who write, read, debug and maintain large software systems. Go's purpose is not to do research programming language design. Go's purpose is to make its designers' programming lives better. Why Go?
  • 9. Go is a compiled, concurrent, garbage-collected, statically typed language developed at . What is Go?
  • 10. fix, fmt, get, install, list, tool, version, vet. build compile packages and dependencies run compile and run Go program clean remove object files env print Go environment information test test packages and benchmarks Go is a tool for managing Go source code... Mainly tools: Others tools:
  • 11. Who are using today? https://github.com/golang/go/wiki/GoUsers
  • 12. ❏ Compiled ❏ Garbage-collected ❏ Has your own runtime ❏ Simple syntax ❏ Great standard library ❏ Cross-platform ❏ Object Oriented (without inheritance) ❏ Statically and stronger typed ❏ Concurrent (goroutines) ❏ Closures ❏ Explicity dependencies ❏ Multiple return values ❏ Pointers ❏ and so on... What will you see in Go?
  • 13. Have not been implemented in favor of efficiency. ❏ Exception handling ❏ Inheritance ❏ Generics ❏ Assert ❏ Method overload What will you not see in Go?
  • 14. see a bit of code!
  • 15. Packages ● Each Go program are compound per packages ● Programs starts from main package ● This example are using the ftm and math packages $ go run packages.go My favorite number is 1
  • 16. ● The var instruction declares a list of variables ● The type is informed at the end ● The var instruction could be in a package or in a function ● The var instruction could includes initializers, 1 per variable. In this case, the type could be ommited because it will be inferred Variables $ go run variables.go 0 false false false $ go run variables-with-initiali 1 2 true false no!
  • 17. $ go run constants.go Hello world! Happy 3.14 Day! Go rules? true ● Constants are declared like variables but with keyword const ● Can not use the syntx := Constants
  • 18. ● Inside a function, the short attribution instruction := can be used instead of a var declaration Short variables declarations $ go run short-variable-declarations.go 1 2 3 true false no!
  • 19. Functions ● Functions could have zero or more arguments ● Notice that the type comes after the parameter name, like variables $ go run functions.go 55
  • 20. ● A function can have multiple return values Multiple return values $ go run multiple-results.go world hello
  • 21. ● Go has just for as looping structure ● It is very similar with C or Java code, except for ( ) ● Start and end declarations can be empty Looping For $ go run for.go 45 $ go run for-continu 1024
  • 22. $ go run for-is-go-while.go 1024 ● Semicolon can be removed and you will have while ● for can run forever Looping "while" and forever $ go run forever.go process took too long
  • 23. ● It is very similar with C or Java code, except for ( ) if Condition $ go run if.go 1.4142135623730951 2i
  • 24. $ go run switch.go Go runs on nacl. ● It is very similar with C or Java code, except for ( ) Switch Condition
  • 25. $ go run defer.go hello world Defer ● Postponing the execution of a function until the function returns ● The arguments of the deferred calls are evaluated immediately
  • 26. What more? ● Pointer ● Struct ● Matrix ● Slice ● Range ● Map ● Value function ● Closures ● Method ● Interface ● Stringer ● Error ● and a lot of more!!! http://go-tour-br.appspot.com
  • 27. $ go run http.go A web server ● It is just simple to build a web server with 15 lines or less!! Could you belive that???
  • 28. ● To execute a goroutine, just go! ● To send or receive information between the goroutines, use channels ● Use the GOMAXPROCS environment variable to define the amount of threads Concurrency (goroutines)
  • 29. $ go run goroutines.go hello world hello world hello world hello world hello ● A goroutine is a lightweight thread managed by Go runtime Goroutines
  • 30. $ go run channels.go 17 -5 12 Channels ● Channels are typed's conduit through which you can send and receive values with the channel operator <-
  • 33. Now you are ready to !
  • 34. Bibliografia ❏ http://golang.org ❏ http://go-tour-br.appspot.com/ ❏ https://tour.golang.org ❏ http://www.golangbr.org/ ❏ https://vimeo.com/49718712 ❏ http://gophercon.com ❏ http://www.infoq.com/br/news/2014/09/go-1-3 ❏ http://www.casadocodigo.com.br/products/livro-google-go ❏ https://pt.wikipedia.org/wiki/Inferno_(sistema_operacional) ❏ http://www.grokpodcast.com/series/a-linguagem-go/ ❏ https://pt.wikipedia.org/wiki/Go_(linguagem_de_programação) ❏ https://gobyexample.com ❏ http://www.goinggo.net/2014/02/the-nature-of-channels-in-go.html ❏ http://www.goinggo.net/2013/09/detecting-race-conditions-with-go.html?m=1 ❏ https://en.wikipedia.org/wiki/Green_threads ❏ http://www.toptal.com/go/go-programming-a-step-by-step-introductory-tutorial