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
130
Other Decks in Programming
See All in Programming
ゲームの物理
fadis
5
1.5k
なぜ今、Terraformの本を書いたのか? - 著者陣に聞く!『Terraformではじめる実践IaC』登壇資料
fufuhu
4
650
Laravel Boost 超入門
fire_arlo
1
120
KessokuでDIでもgoroutineを活用する / Go Connect #6
mazrean
0
110
【第4回】関東Kaggler会「Kaggleは執筆に役立つ」
mipypf
0
780
kiroでゲームを作ってみた
iriikeita
0
180
オープンセミナー2025@広島「君はどこで動かすか?」アンケート結果
satoshi256kbyte
0
200
サーバーサイドのビルド時間87倍高速化
plaidtech
PRO
0
490
[FEConf 2025] 모노레포 절망편, 14개 레포로 부활하기까지 걸린 1년
mmmaxkim
0
990
Scale out your Claude Code ~自社専用Agentで10xする開発プロセス~
yukukotani
9
2.6k
Dart 参戦!!静的型付き言語界の隠れた実力者
kno3a87
0
210
Claude Codeで実装以外の開発フロー、どこまで自動化できるか?失敗と成功
ndadayo
2
1.4k
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Facilitating Awesome Meetings
lara
55
6.5k
Become a Pro
speakerdeck
PRO
29
5.5k
Docker and Python
trallard
45
3.5k
Designing for Performance
lara
610
69k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Designing Experiences People Love
moore
142
24k
Done Done
chrislema
185
16k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
6k
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