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
290
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
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
13
12k
自動テストを活かすためのテスト分析・テスト設計の進め方/JaSST25 Shikoku
goyoki
3
680
モビリティSaaSにおけるデータ利活用の発展
nealle
0
260
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
160
Building AI with AI
inesmontani
PRO
0
190
Querying Design System デザインシステムの意思決定を支える構造検索
ikumatadokoro
1
1.1k
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
0
710
The Missing Link in Angular's Signal Story: Resource API and httpResource
manfredsteyer
PRO
0
130
Designing Repeatable Edits: The Architecture of . in Vim
satorunooshie
0
390
オフライン対応!Flutterアプリに全文検索エンジンを実装する @FlutterKaigi2025
itsmedreamwalker
2
210
DartASTとその活用
sotaatos
2
130
高単価案件で働くための心構え
nullnull
0
140
Featured
See All Featured
Navigating Team Friction
lara
190
15k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Why Our Code Smells
bkeepers
PRO
340
57k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Being A Developer After 40
akosma
91
590k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
320
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