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
320
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
A beleza das interfaces em Go
pcasarettto
July 09, 2016
More Decks by pcasarettto
See All by pcasarettto
Bundler
pcasarettto
1
140
Other Decks in Programming
See All in Programming
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
130
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
450
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.5k
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
630
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
3
1.4k
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
350
今さら聞けない .NET CLI
htkym
0
170
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.7k
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
380
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
200
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
140
yield再入門 #phpcon
o0h
PRO
0
850
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
KATA
mclloyd
PRO
35
15k
Evolving SEO for Evolving Search Engines
ryanjones
0
250
The World Runs on Bad Software
bkeepers
PRO
72
12k
Leo the Paperboy
mayatellez
8
2k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
160
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
450
Making the Leap to Tech Lead
cromwellryan
135
10k
Exploring anti-patterns in Rails
aemeredith
3
450
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.7k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
440
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