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
260
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
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
Haze - Real time background blurring
chrisbanes
1
510
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
140
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
240
nekko cloudにおけるProxmox VE利用事例
irumaru
3
430
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
2
770
fs2-io を試してたらバグを見つけて直した話
chencmd
0
230
あれやってみてー駆動から成長を加速させる / areyattemite-driven
nashiusagi
1
200
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
ドメインイベント増えすぎ問題
h0r15h0
1
280
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
133
9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Adopting Sorbet at Scale
ufuk
73
9.1k
Six Lessons from altMBA
skipperchong
27
3.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Code Review Best Practice
trishagee
65
17k
A designer walks into a library…
pauljervisheath
204
24k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
97
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Navigating Team Friction
lara
183
15k
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