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
A beleza das interfaces em Go
Search
pcasarettto
July 09, 2016
Programming
2
280
A beleza das interfaces em Go
pcasarettto
July 09, 2016
Tweet
Share
More Decks by pcasarettto
See All by pcasarettto
Bundler
pcasarettto
1
120
Other Decks in Programming
See All in Programming
WindowInsetsだってテストしたい
ryunen344
1
230
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
250
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
1.8k
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
260
Result型で“失敗”を型にするPHPコードの書き方
kajitack
4
570
Is Xcode slowly dying out in 2025?
uetyo
1
250
Systèmes distribués, pour le meilleur et pour le pire - BreizhCamp 2025 - Conférence
slecache
0
120
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
240
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
0
750
Hypervel - A Coroutine Framework for Laravel Artisans
albertcht
1
110
VS Code Update for GitHub Copilot
74th
1
580
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
260
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
The World Runs on Bad Software
bkeepers
PRO
69
11k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Optimizing for Happiness
mojombo
379
70k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
A designer walks into a library…
pauljervisheath
207
24k
Gamification - CAS2011
davidbonilla
81
5.3k
Fireside Chat
paigeccino
37
3.5k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
How GitHub (no longer) Works
holman
314
140k
BBQ
matthewcrist
89
9.7k
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