Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introdução a Go
Search
Elton Minetto
May 11, 2022
Programming
310
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introdução a Go
Nesta palestra faço uma introdução a linguagem Go
Elton Minetto
May 11, 2022
More Decks by Elton Minetto
See All by Elton Minetto
Criando Kubernetes Operators com o operator-sdk
eminetto
0
170
Developer productivity for fun and profit - Enterprise edition
eminetto
0
120
Criando Kubernetes Operators com o operator-sdk
eminetto
0
160
Developer productivity for fun and profit - Developer edition
eminetto
3
560
Observabilidade de APIs
eminetto
1
1k
Reflexões sobre Design de Software
eminetto
1
530
Discussões sobre microsserviços
eminetto
0
170
Go, o que, por que e como?
eminetto
0
390
Dev Journey
eminetto
0
510
Other Decks in Programming
See All in Programming
新卒PdEのリアル
ryu1013
1
410
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
120
「AI時代、配布するPythonコードをどう守るか: 難読化の実験と判断軸」 #PyconJP2026
pkshadeck
PRO
2
170
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
270
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.3k
Hono + Inertia + React で LP を構築した話
oukayuka
2
210
What We Talk About When We Talk About XP
m_seki
2
360
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
2
1.5k
私のClaude Code活用法 (個人開発編) - PHPerKaigi mini #4(2026/08/24)
panda_program
1
210
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
160
ALB ログから Trace を気合で繋げる技術
fohte
7
880
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
Featured
See All Featured
A better future with KSS
kneath
240
18k
How to build a perfect <img>
jonoalderson
1
6k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
The SEO Collaboration Effect
kristinabergwall1
1
550
KATA
mclloyd
PRO
35
15k
Color Theory Basics | Prateek | Gurzu
gurzu
0
460
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
450
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
220
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
490
Building the Perfect Custom Keyboard
takai
2
860
Transcript
Introdução a Go
Elton Minetto ๏ Escrevo códigos, sou professor, palestrante, e escritor
๏ Escrevo no https://eltonminetto.dev e no twitter ๏ Sou Principal Software Engineer no PicPay
O que é?
Uma linguagem open source
None
Por que uma nova linguagem?
Muitos problemas com software em grande escala
Velocidade de compilação
Sistemas distribuídos Multicore
Objetivos
Semântica simples
Tipagem estática
Programação concorrente
Divertida!
TALK IS CHEAP, SHOW ME THE CODE!
Pacotes package main import ( "fmt" "math" ) func main()
{ fmt.Printf("Now you have %g problems.", math.Sqrt(7)) }
Resultados Múltiplos package main import "fmt" func swap(x, y string)
(string, string) { return y, x } func main() { a, b := swap("hello", "world") fmt.Println(a, b) }
Erros package main import "github.com/coderockr/nfe/transmitter" func main() { response, err
:= transmitter.transmit(nfe, xml) if err != nil { panic("Error ") //tratamento de erro qualquer } result, err := transmitter.saveData(response, xml) if err != nil { panic("Error ") //tratamento de erro qualquer } }
Goroutines package main import ( "fmt" "time" ) func say(s
string) { for i := 0; i < 5; i++ { time.Sleep(100 * time.Millisecond) fmt.Println(s) } } func main() { go say("world") say("hello") }
Canais package main import "fmt" func sum(s []int, c chan
int) { sum := 0 for _, v := range s { sum += v } c <- sum // send sum to c } func main() { s := []int{7, 2, 8, -9, 4, 0} c := make(chan int) go sum(s[:len(s)/2], c) go sum(s[len(s)/2:], c) x, y := <-c, <-c // receive from c fmt.Println(x, y, x+y) }
Cross Compilation GOOS=darwin GOARCH=amd64 go build gorotines.go GOOS=windows GOARCH=amd64 go
build gorotines.go GOOS=linux GOARCH=amd64 go build gorotines.go
OO via composição e não herança, biblioteca padrão poderosa, etc.
Quem está usando?
Google, Basecamp, Globo.com, Canonical, DigitalOcean, Dropbox, Github, Heroku, Medium, Docker,
MongoDB, Mozilla, Netflix, New Relic, New York Times, Resultados Digitais, Moip, Neoway, Walmart, Trybe, PicPay, etc https://github.com/golang/go/wiki/GoUsers
Aplicações
APIs
Microservices
IoT
Databases
CLIents
Material de estudo
Site oficial Tour Go, por onde começar? Livro: A Linguagem
de Programação Go Curso Desenvolvimento Web com Go Awesome Go
Contato
[email protected]
http://eltonminetto.dev http://twitter.com/eminetto