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
Learning Unsung Gotchas of Go - Rashmi Nagpal
Search
GopherCon Russia
April 23, 2021
Programming
1
290
Learning Unsung Gotchas of Go - Rashmi Nagpal
GopherCon Russia
April 23, 2021
Tweet
Share
More Decks by GopherCon Russia
See All by GopherCon Russia
Go Profiling from Bottom Up - Felix Geisendörfer
gopherconrussia
0
240
Прозрачный gRPC-proxy один-ко-многим - Андрей Смирнов
gopherconrussia
0
150
Из Python в Go и обратно - Андрей Минкин
gopherconrussia
0
160
Оптимизация работы с PostgreSQL в Go: от 50 до 5000 RPS - Иван Осадчий
gopherconrussia
0
190
Пакет embed: распаковка знаний - Илья Данилкин
gopherconrussia
0
260
За пару мгновений до main() - Олег Ковалев
gopherconrussia
0
150
Тестирование в Go c Ginkgo и Gomega - Александр Егурнов
gopherconrussia
0
140
Building an Autoscaling HTTP Proxy for Kubernetes - Aaron Schlesinger
gopherconrussia
0
140
Designing Pluggable Idiomatic Go Applications – Mark Bates
gopherconrussia
0
72
Other Decks in Programming
See All in Programming
Claude Code、ちょっとした工夫で開発体験が変わる
tigertora7571
0
200
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
160
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
200
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
230
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.4k
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
2
230
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
170
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
920
TipKitTips
ktcryomm
0
150
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
550
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
160
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
410
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
130
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
600
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
The Curse of the Amulet
leimatthew05
1
9.6k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
380
From π to Pie charts
rasagy
0
140
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
30 Presentation Tips
portentint
PRO
1
250
How to build a perfect <img>
jonoalderson
1
5.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
GitHub's CSS Performance
jonrohan
1032
470k
Transcript
Learning Unsung Gotchas in Go Gopher Artwork by Ashley McNamara
Rashmi Nagpal Software Engineering Intern, LoopUp GopherCon Russia
Range iterator returns “two values”
None
Defer doesn't work for code blocks, only for the whole
function
None
Same Address for Different Zero-sized Variables
None
Iterating through map using “for range”
None
WaitGroup allows the goroutines to cleanly exit before exiting the
main program
None
Read and Write Operation Reordering
None
Unmarshalling JSON numbers into interface values
None
None
Recovering from Panic
None
None
Map is a reference
None
None
Data race condition
None
None
For loop iterators can be reused in go routine
None
None
Defer calls are executed in LIFO manner
None
None
Not to use More() to check if there are remaining
JSON objects in a stream
None
None
Non-ASCII punctuation characters aren't supported in struct tags
None
None
Fork-join model should be handled carefully
None
None
Deadlock!
None
None
Bibliography Resources 1. Documentation - The Go Programming Language 2.
A Go Gotcha: When Closures and Goroutines Collide 3. Darker Corners of Go – Rytis Biel 4. kstenerud/go-gotchas: Common gotchas with golang and how to work around them Visuals 1. ashleymcnamara/gophers: Gopher Artwork by Ashley McNamara
Спасибо
QnA