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
270
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
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
28
6.1k
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
370
shadcn/uiを使ってReactでの開発を加速させよう!
lef237
0
390
Rubyでつくるパケットキャプチャツール
ydah
0
540
最近のVS Codeで気になるニュース 2025/01
74th
1
240
2025.01.17_Sansan × DMM.swift
riofujimon
2
670
asdf-ecspresso作って 友達が増えた話 / Fujiwara Tech Conference 2025
koluku
0
1.6k
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
260
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
0
230
動作確認やテストで漏れがちな観点3選
starfish719
5
880
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
630
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Side Projects
sachag
452
42k
Building Your Own Lightsaber
phodgson
104
6.2k
Done Done
chrislema
182
16k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
51k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Site-Speed That Sticks
csswizardry
3
310
Designing Experiences People Love
moore
139
23k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Thoughts on Productivity
jonyablonski
68
4.4k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
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