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
72
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
84
Go Meetup dezembro
renatosuero
0
42
Golang PixelsCamp
renatosuero
0
54
Hey oh let's go
renatosuero
0
40
GO Meetup
renatosuero
0
59
Aplicação Dinâmica com BackboneJS
renatosuero
0
31
Provisionando Servidores com Ansible
renatosuero
0
230
Other Decks in Technology
See All in Technology
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
0
340
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
1.7k
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
Data Hubグループ 紹介資料
sansan33
PRO
0
2.7k
仕様書駆動AI開発の実践: Issue→Skill→PRテンプレで 再現性を作る
knishioka
2
620
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
4
1.3k
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
580
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
Codex 5.3 と Opus 4.6 にコーポレートサイトを作らせてみた / Codex 5.3 vs Opus 4.6
ama_ch
0
110
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
200
データの整合性を保ちたいだけなんだ
shoheimitani
8
3k
生成AIを活用した音声文字起こしシステムの2つの構築パターンについて
miu_crescent
PRO
1
160
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
432
66k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
72
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
49
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
65
Skip the Path - Find Your Career Trail
mkilby
0
53
The Cult of Friendly URLs
andyhume
79
6.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The Curse of the Amulet
leimatthew05
1
8.4k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
450
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