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
Godoc: хороший, плохой, злой
Search
Ilya Kaznacheev
July 18, 2020
Programming
57
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Godoc: хороший, плохой, злой
Ilya Kaznacheev
July 18, 2020
More Decks by Ilya Kaznacheev
See All by Ilya Kaznacheev
Road to four nines
dreamworm
0
37
Many Layers of Availability
dreamworm
0
110
Stateful Solutions: A Hands-On Guide to FSM in Golang
dreamworm
0
220
CQRS
dreamworm
0
190
Building a Cloud-Native PaaS
dreamworm
0
170
Distributed System State Management: When Transactions Are Long and SLA Is High
dreamworm
0
170
How To Create Saga-Free Distributed Transactions
dreamworm
0
90
Architectural decisions in building distributed systems
dreamworm
0
46
Распределенные транзакции без саг
dreamworm
0
220
Other Decks in Programming
See All in Programming
MySQLとPostgreSQLって何が違うの?
akagami
0
140
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
110
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
260
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.8k
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
290
Android CLI
fornewid
0
240
React本体のコードリーディング
high_g_engineer
1
160
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
3
2k
「人を評価する AI」の設計と実装
ryoyanara
0
240
Flow は今どうなっているか
mizdra
PRO
0
720
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
120
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
330
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
Leo the Paperboy
mayatellez
8
2.2k
Automating Front-end Workflow
addyosmani
1369
210k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
360
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
250
A Modern Web Designer's Workflow
chriscoyier
698
190k
My Coaching Mixtape
mlcsv
0
280
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
630
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
380
Embracing the Ebb and Flow
colly
88
5.1k
Transcript
GODOC
Ilya Kaznacheev Remote Backend SWE Основатель Golang Voronezh Соавтор Z-Namespace
podcast Организатор конференций и митапов Любитель кофе
Golang Voronezh - ~30 активных участников - митапы - мероприятия
для новичков
- инструмент для встроенной в код документации - сайт для
хостинга документации публичных проектов godoc
documentation for a code
None
code v1.7.13 docs v1.1.6
documentation as a code
JavaDoc JSDoc Python Docstring ABAPDoc Godoc
what Godoc is?
Formatting guideline // ReadConfig reads configuration file and parses it
depending on tags in structure provided. // Then it reads and parses // // Example: // // type ConfigDatabase struct { // Port string `yaml:"port" env:"PORT" env-default:"5432"` // Host string `yaml:"host" env:"HOST" env-default:"localhost"` // Name string `yaml:"name" env:"NAME" env-default:"postgres"` // User string `yaml:"user" env:"USER" env-default:"user"` // Password string `yaml:"password" env:"PASSWORD"` // } // // var cfg ConfigDatabase // // err := cleanenv.ReadConfig("config.yml", &cfg) // if err != nil { // ... // } func ReadConfig(path string, cfg interface{}) error { … }
IDE support
IDE support
None
является ли Godoc идеальным инструментом для документации?
THE UGLY
None
None
THE BAD
None
None
THE GOOD
None
None
Документация может быть очень подробной, однако абсолютно бесполезной
как писать хорошую документацию?
не пишите книгу пишите инструкцию
от общего к частному
явная точка входа
реальные примеры и советы по использованию
примеры!
примеры! примеры!
примеры! примеры! примеры!
None
// ExampleGetDescription_customHeaderText builds a description text from structure tags with
custom header s func ExampleGetDescription_customHeaderText() { type config struct { One int64 `env:"ONE" env-description:"first parameter"` Two float64 `env:"TWO" env-description:"second parameter"` Three string `env:"THREE" env-description:"third parameter"` } var cfg config header := "Custom header text:" text, err := cleanenv.GetDescription(&cfg, &header) if err != nil { panic(err) } fmt.Println(text) //Output: Custom header text: // ONE int64 // first parameter // TWO float64 // second parameter // THREE string // third parameter }
None
✍
ведь есть README.md?
нет поддержки Markdown противно
у меня приватный репо, зачем мне вообще надо?
None
полезные ссылки dev.to/ilyakaznacheev/what-s-wrong-with-godoc-3319 blog.golang.org/godoc
ilyakaznacheev