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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Elton Minetto
May 11, 2022
Programming
300
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
160
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
520
Discussões sobre microsserviços
eminetto
0
170
Go, o que, por que e como?
eminetto
0
380
Dev Journey
eminetto
0
510
Other Decks in Programming
See All in Programming
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
300
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
1
140
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
120
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
320
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.8k
Foundation Models frameworkで画像分析
ryodeveloper
1
620
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
5
1.8k
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
110
Go 1.27 における memory allocation の高速化
andpad
0
210
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
19k
数百円から始めるRuby電子工作
tarosay
0
160
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
500
Featured
See All Featured
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
860
Why Our Code Smells
bkeepers
PRO
340
58k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
490
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
How to make the Groovebox
asonas
2
2.3k
Chasing Engaging Ingredients in Design
codingconduct
0
270
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
710
Prompt Engineering for Job Search
mfonobong
0
400
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
340
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