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
66
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
63
Go Meetup dezembro
renatosuero
0
32
Golang PixelsCamp
renatosuero
0
48
Hey oh let's go
renatosuero
0
30
GO Meetup
renatosuero
0
53
Aplicação Dinâmica com BackboneJS
renatosuero
0
20
Provisionando Servidores com Ansible
renatosuero
0
210
Other Decks in Technology
See All in Technology
Observabilityジャーニーを実現するためのAWSサービス:OSS編
o11yfes2023
0
110
大規模言語モデル (LLM)における低精度数値表現
pfn
PRO
3
800
cgroup v2 で何が変わったのか / TechFeed Experts Night #28
tenforward
2
160
スムーズなエントリーで滞在を心地よくスタート_team 1@NOT A HOTEL
satomifukuda
0
100
株式会社EventHub・エンジニア採用資料
eventhub
0
2.1k
CockroachDB はどのくらい「しぶとい」のか? / How tough is CockroachDB?
kota2and3kan
13
4.9k
知識と実践を紡ぐGenAI / Connecting Knowledge and experience with GenAI
aki_moon
2
170
1Q86
kawaguti
PRO
2
180
Deno で作る快適な “as Code” プラットフォーム – TSKaigi 2024
pizzacat83
4
310
NewSQL Landscape
oracle4engineer
PRO
5
3.2k
令和版ソフトウェアエンジニアの情報収集術 PHPカンファレンス香川2024
ysknsid25
4
840
回り回って効いてくる副次的効果としての技術広報/techpr
nishiuma
1
180
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
34
6.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
4 Signs Your Business is Dying
shpigford
176
21k
Art, The Web, and Tiny UX
lynnandtonic
290
19k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
Principles of Awesome APIs and How to Build Them.
keavy
121
16k
The Brand Is Dead. Long Live the Brand.
mthomps
49
30k
Build your cross-platform service in a week with App Engine
jlugia
226
17k
GraphQLの誤解/rethinking-graphql
sonatard
56
9.3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
245
20k
Optimizing for Happiness
mojombo
370
69k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
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