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
74
0
Share
Let's GO
Apresentação sobre GO na primeIT em abril de 2017
Renato Suero
April 20, 2017
More Decks by Renato Suero
See All by Renato Suero
Implementando realtime usando MQTT e Go
renatosuero
0
86
Go Meetup dezembro
renatosuero
0
44
Golang PixelsCamp
renatosuero
0
56
Hey oh let's go
renatosuero
0
40
GO Meetup
renatosuero
0
60
Aplicação Dinâmica com BackboneJS
renatosuero
0
33
Provisionando Servidores com Ansible
renatosuero
0
230
Other Decks in Technology
See All in Technology
GCASアップデート(202603-202605)
techniczna
0
190
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
1.7k
React Compiler導入の効果と運用の工夫
kakehashi
PRO
3
200
Terragrunt x Snowflake + dbt で作るマルチテナントなデータ基盤構築プラットフォーム
gak_t12
0
230
いつの間にかデータエンジニア以外の業務も増えていたけど、意外と経験が役に立ってる
zozotech
PRO
0
630
Gaussian Splattingの表現力を拡張する — 高周波再構成とインタラクションへのアプローチ —
gpuunite_official
0
180
バイブコーディング、仕様駆動、その先へ - 「不確実性に対する検査‧適応のサイクル」を設計する
littlehands
1
520
セキュリティ対策、何からはじめる? CloudNative環境の脅威モデリングと リスク評価実践入門 #cloudnativekaigi
varu3
5
970
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.4k
既存プロダクトQAから新規プロダクトQAへ
ryotakahashi
0
140
エムスリーテクノロジーズ株式会社 エンジニア向け紹介資料 / M3 Technologies Company Deck
m3_engineering
0
170
JTCでRedmine利用者2700人を実現した手法 第二部
nobuonakamura
0
110
Featured
See All Featured
Everyday Curiosity
cassininazir
0
210
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Building an army of robots
kneath
306
46k
Making Projects Easy
brettharned
120
6.6k
Google's AI Overviews - The New Search
badams
0
1k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
140
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
360
The Invisible Side of Design
smashingmag
302
52k
Un-Boring Meetings
codingconduct
0
290
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