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
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.8k
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
430
時間軸から考えるTerraformを使う理由と留意点
fufuhu
16
4.8k
ユーザーも開発者も悩ませない TV アプリ開発 ~Compose の内部実装から学ぶフォーカス制御~
taked137
0
160
AI時代のUIはどこへ行く?
yusukebe
18
8.8k
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
240
速いWebフレームワークを作る
yusukebe
5
1.7k
FindyにおけるTakumi活用と脆弱性管理のこれから
rvirus0817
0
510
🔨 小さなビルドシステムを作る
momeemt
4
680
為你自己學 Python - 冷知識篇
eddie
1
350
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
Improving my own Ruby thereafter
sisshiki1969
1
160
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Context Engineering - Making Every Token Count
addyosmani
2
41
What's in a price? How to price your products and services
michaelherold
246
12k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
Embracing the Ebb and Flow
colly
87
4.8k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Faster Mobile Websites
deanohume
309
31k
GitHub's CSS Performance
jonrohan
1032
460k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Balancing Empowerment & Direction
lara
3
620
How to Think Like a Performance Engineer
csswizardry
26
1.9k
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