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
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
130
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
1
440
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
400
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
1.4k
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
9
2.4k
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
630
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
180
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
200
良いユニットテストを書こう
mototakatsu
11
3.6k
Оптимизируем производительность блока Казначейство
lamodatech
0
950
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
7
1.4k
ErdMap: Thinking about a map for Rails applications
makicamel
1
650
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
Designing Experiences People Love
moore
139
23k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Side Projects
sachag
452
42k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
360
Mobile First: as difficult as doing things right
swwweet
222
9k
Site-Speed That Sticks
csswizardry
3
270
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
192
16k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
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