Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
A beleza das interfaces em Go
pcasarettto
July 09, 2016
Programming
2
180
A beleza das interfaces em Go
pcasarettto
July 09, 2016
Tweet
Share
More Decks by pcasarettto
See All by pcasarettto
Bundler
pcasarettto
1
100
Other Decks in Programming
See All in Programming
ES2022の新機能
smt7174
0
250
Angular‘s Future without NgModules: Architectures with Standalone Components @enterJS
manfredsteyer
PRO
0
230
オブジェクト指向で挫折する初学者へ
deepoil
0
160
VisualProgramming_GoogleHome_LINE
nearmugi
1
230
マルチプロダクト×非構造化データ×機械学習を支えるデータ信頼性
akino
0
130
What's new in Android development tools まとめ
mkeeda
0
330
GitHubのユーザー名を変更した後のあれこれ
tahia910
0
130
Power Automateドリブンのチームマネジメント
hanaseleb
0
190
【Scrum Fest Osaka 2022】スクラムチームに放り込まれた若手エンジニアの皆さん、どのように技術のキャッチアップをしていくかイメージはついていますか?
miiiki
0
110
「混ぜるな危険」を推進する設計
minodriven
5
1.5k
模組化的Swift架構(二) DDD速成
haifengkao
0
390
Web API連携でCSRF対策がどう実装されてるか調べた / how to implements csrf-detection on Web API
yasuakiomokawa
2
420
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
296
110k
Automating Front-end Workflow
addyosmani
1351
200k
Six Lessons from altMBA
skipperchong
14
1.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
269
11k
Creatively Recalculating Your Daily Design Routine
revolveconf
207
10k
4 Signs Your Business is Dying
shpigford
169
20k
Fashionably flexible responsive web design (full day workshop)
malarkey
396
62k
Building Better People: How to give real-time feedback that sticks.
wjessup
344
17k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
37
3.3k
Web development in the modern age
philhawksworth
197
9.3k
Designing with Data
zakiwarfel
91
3.9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
237
19k
Transcript
A beleza das interfaces em Go
Paulo Casaretto @pcasaretto
Interface
Interfaces em Go
None
None
None
io.Reader io.Writer
io.Copy io.Reader io.Writer
Reader Example: GIF Decoder
os.File deblockingReader lzw.Reader
os.File | deblockingReader | lzw.Reader
os.File deblockingReader lzw.Reader io.Reader
Usando interfaces
None
None
None
None
Two relevant Go proverbs
THE BIGGER THE INTERFACE, THE WEAKER THE ABSTRACTION
interface{} says nothing
ProTip
• https://blog.golang.org/error-handling-and-go • https://blog.golang.org/errors-are-values • https://blog.golang.org/gif-decoder-exercise- in-go-interfaces • https://go-proverbs.github.io/ Resources
Thanks!
panic(“Thanks!”)
None
None
None