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
20250429 - CNTUG Meetup #67 / DevOps Taiwan Meetup #69 - Deep Dive into Tetragon: Building Runtime Security and Observability with eBPF
tico88612
0
150
Thank you <💅>, What's the Next?
ahoxa
1
570
設計の本質:コード、システム、そして組織へ / The Essence of Design: To Code, Systems, and Organizations
nrslib
10
3.5k
RuboCop: Modularity and AST Insights
koic
2
2.1k
API for docs
soutaro
3
1.5k
個人開発の学生アプリが企業譲渡されるまで
akidon0000
0
1.1k
REALITY コマンド作成チュートリアル
nishiuriraku
0
110
MCP調べてみました! / Exploring MCP
uhzz
2
2.3k
SwiftDataのカスタムデータストアを試してみた
1mash0
0
130
エンジニアが挑む、限界までの越境
nealle
1
290
파급효과: From AI to Android Development
l2hyunwoo
0
150
Glue Studio Visual ETL実装時にハマったこと
kokitamura
0
100
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
23
1.5k
Unsuck your backbone
ammeep
670
57k
Faster Mobile Websites
deanohume
306
31k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.6k
Statistics for Hackers
jakevdp
798
220k
Why Our Code Smells
bkeepers
PRO
336
57k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Building an army of robots
kneath
305
45k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Designing for humans not robots
tammielis
253
25k
A designer walks into a library…
pauljervisheath
205
24k
Code Review Best Practice
trishagee
67
18k
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