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
F#で自在につくる静的ブログサイト - 関数型まつり2025
pizzacat83
0
100
2度もゼロから書き直して、やっとブラウザでぬるぬる動くAIに辿り着いた話
tomoino
0
130
単体テストの始め方/作り方
toms74209200
0
360
OpenNext + Hono on Cloudflare でイマドキWeb開発スタックを実現する
rokuosan
0
110
Perlで痩せる
yuukis
1
670
Prism.parseで 300本以上あるエンドポイントに 接続できる権限の一覧表を作ってみた
hatsu38
1
100
データベースコネクションプール(DBCP)の変遷と理解
fujikawa8
0
200
RubyKaigiで得られる10の価値 〜Ruby話を聞くことだけが RubyKaigiじゃない〜
tomohiko9090
0
130
Devinで実践する!AIエージェントと協働する開発組織の作り方
masahiro_nishimi
6
2.8k
UPDATEがシステムを複雑にする? イミュータブルデータモデルのすすめ
shimomura
0
500
型付け力を強化するための Hoogle のすゝめ / Boosting Your Type Mastery with Hoogle
guvalif
1
250
Feature Flag 自動お掃除のための TypeScript プログラム変換
azrsh
PRO
4
670
Featured
See All Featured
Building Adaptive Systems
keathley
42
2.6k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Building Applications with DynamoDB
mza
95
6.4k
Become a Pro
speakerdeck
PRO
28
5.4k
Speed Design
sergeychernyshev
30
980
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.7k
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