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
68
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
70
Go Meetup dezembro
renatosuero
0
37
Golang PixelsCamp
renatosuero
0
49
Hey oh let's go
renatosuero
0
35
GO Meetup
renatosuero
0
55
Aplicação Dinâmica com BackboneJS
renatosuero
0
25
Provisionando Servidores com Ansible
renatosuero
0
220
Other Decks in Technology
See All in Technology
20241125 - AI 繪圖實戰魔法工作坊 @ 實踐大學
dpys
1
430
The key to VCP-VCF
mirie_sd
0
150
Alignment and Autonomy in Cybozu - 300人の開発組織でアラインメントと自律性を両立させるアジャイルな組織運営 / RSGT2025
ama_ch
1
1.1k
UI State設計とテスト方針
rmakiyama
4
940
30分でわかるデータ分析者のためのディメンショナルモデリング #datatechjp / 20250120
kazaneya
PRO
12
3.3k
いまからでも遅くないコンテナ座学
nomu
0
190
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
280
AWS re:Invent 2024 ふりかえり勉強会
yhana
0
680
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
3
1.6k
AWS環境におけるランサムウェア攻撃対策の設計
nrinetcom
PRO
1
320
20240522 - 躍遷創作理念 @ PicCollage Workshop
dpys
0
290
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
820
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
RailsConf 2023
tenderlove
29
960
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Visualization
eitanlees
146
15k
Thoughts on Productivity
jonyablonski
68
4.4k
Faster Mobile Websites
deanohume
305
30k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
1
150
Side Projects
sachag
452
42k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
How STYLIGHT went responsive
nonsquared
96
5.3k
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