Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
290
A beleza das interfaces em Go
pcasarettto
July 09, 2016
Tweet
Share
More Decks by pcasarettto
See All by pcasarettto
Bundler
pcasarettto
1
130
Other Decks in Programming
See All in Programming
sbt 2
xuwei_k
0
220
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
290
分散DBって何者なんだ... Spannerから学ぶRDBとの違い
iwashi623
0
180
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.2k
Developing static sites with Ruby
okuramasafumi
0
190
モダンJSフレームワークのビルドプロセス 〜なぜReactは503行、Svelteは12行なのか〜
fuuki12
0
210
チームをチームにするEM
hitode909
0
250
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
6
2.9k
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
110
AI時代もSEOを頑張っている話
shirahama_x
0
260
Level up your Gemini CLI - D&D Style!
palladius
1
180
CSC305 Lecture 17
javiergs
PRO
0
300
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
A designer walks into a library…
pauljervisheath
210
24k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
Designing Experiences People Love
moore
143
24k
Fireside Chat
paigeccino
41
3.7k
Raft: Consensus for Rubyists
vanstee
141
7.2k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
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