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
Let's GO
Search
Renato Suero
April 20, 2017
Technology
0
70
Let's GO
Apresentação sobre GO na primeIT em abril de 2017
Renato Suero
April 20, 2017
Tweet
Share
More Decks by Renato Suero
See All by Renato Suero
Implementando realtime usando MQTT e Go
renatosuero
0
76
Go Meetup dezembro
renatosuero
0
41
Golang PixelsCamp
renatosuero
0
52
Hey oh let's go
renatosuero
0
37
GO Meetup
renatosuero
0
58
Aplicação Dinâmica com BackboneJS
renatosuero
0
27
Provisionando Servidores com Ansible
renatosuero
0
220
Other Decks in Technology
See All in Technology
「改善」ってこれでいいんだっけ?
ukigmo_hiro
0
380
Findy Team+ QAチーム これからのチャレンジ!
findy_eventslides
0
480
SCONE - 動画配信の帯域を最適化する新プロトコル
kazuho
1
270
ビズリーチ求職者検索におけるPLMとLLMの活用 / Search Engineering MEET UP_2-1
visional_engineering_and_design
1
180
React19.2のuseEffectEventを追う
maguroalternative
2
560
Railsの話をしよう
yahonda
0
170
Dylib Hijacking on macOS: Dead or Alive?
patrickwardle
0
420
CoRL 2025 Survey
harukiabe
1
230
「最速」で Gemini CLI を使いこなそう! 〜Cloud Shell/Cloud Run の活用〜 / The Fastest Way to Master the Gemini CLI — with Cloud Shell and Cloud Run
aoto
PRO
0
140
HR Force における DWH の併用事例 ~ サービス基盤としての BigQuery / 分析基盤としての Snowflake ~@Cross Data Platforms Meetup #2「BigQueryと愉快な仲間たち」
ryo_suzuki
0
250
今この時代に技術とどう向き合うべきか
gree_tech
PRO
2
2.1k
混合雲環境整合異質工作流程工具運行關鍵業務 Job 的經驗分享
yaosiang
0
110
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Mobile First: as difficult as doing things right
swwweet
225
10k
A better future with KSS
kneath
239
18k
For a Future-Friendly Web
brad_frost
180
10k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Fireside Chat
paigeccino
40
3.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
190
55k
Docker and Python
trallard
46
3.6k
Rails Girls Zürich Keynote
gr2m
95
14k
How STYLIGHT went responsive
nonsquared
100
5.8k
Transcript
None
GO != Golang
@renatosuero
Um pouco de história Em 2007 começa um projeto interno
no google. Desenvolvido por Rob Pike, Ken Thompson e Robert Griesemer. Em novembro de 2009 o google abriu o fonte da linguagem
https://github.com/golang/go/wiki/GoUsers
None
mkdir -p ~/go/{bin,src,pkg} src Go source code organized into packages
pkg OS and architecture specific compilation artifacts bin Executable Go programs Workspace
touch $GOPATH/src/hello.go package main import "fmt" func main() { fmt.Println("Hello
World") } Hello World
https://golang.org/cmd/go/ go run arquivo.go executa seu codigo go build gera
um arquivo executável go test executa a suíte de testes go env mostrará variáveis de ambiente go get descarrega e instala pacotes e dep. Go Tools
Testes Arquivos terminados com *_test.go, serão executados pela suíte de
testes, mas ignorados no buid; É necessário importar o pacote testing; As funções começam com Test* serão executadas,assim podemos criar auxiliares/setups; Deve receber um ponteiro de testing.T como parametro;
Testes - exemplo package main import "testing" func TestSoma(t *testing.T)
{ n := Soma(600, 66) if n != 666 { t.Error("Resultado diferente do esperado") } } func Soma(x, y int) int { return x + y }
None
API Hello World
None
None
Siege - Http loading testing and benchmarking utility. Siege params
URL -c *n => numero de requests concorrentes -r *n => numero de repetições por request
Siege -c 8 -r 200 http://localhost:3000/hello Siege -c 8 -r
200 http://localhost:8080/hello
None
Siege -c 10 -r 1 http://localhost:3000/hello2 Siege -c 10 -r
1 http://localhost:8080/hello2
None
None
None
API + JSON
None
None
cache
Projetos
https://awesome-go.com/#software-packages
Avg 200k / min. Testes Resposta Grails ~85seg 9ms GO
~3.5seg ~0.5ms
https://imasters.com.br/linguagens/o-ceu-e-o-limite-na-utilizacao-de-golang
Referências Effective GO https://golang.org/doc/effective_go.html Go tour https://tour.golang.org/welcome/1 Go By example
https://gobyexample.com/
https://invite.slack.golangbridge.org/ https://gophers.slack.com/
None
@renatosuero