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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
28
Many Layers of Availability
dreamworm
0
100
Stateful Solutions: A Hands-On Guide to FSM in Golang
dreamworm
0
210
CQRS
dreamworm
0
180
Building a Cloud-Native PaaS
dreamworm
0
160
Distributed System State Management: When Transactions Are Long and SLA Is High
dreamworm
0
150
How To Create Saga-Free Distributed Transactions
dreamworm
0
79
Architectural decisions in building distributed systems
dreamworm
0
42
Распределенные транзакции без саг
dreamworm
0
210
Other Decks in Programming
See All in Programming
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
140
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
120
New "Type" system on PicoRuby
pocke
1
970
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
120
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
C# and C++ Interoperability - cho-dotnetnew
harukasao
0
260
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.4k
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
11
4.3k
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
880
Oxcを導入して開発体験が向上した話
yug1224
4
320
Contextとはなにか
chiroruxx
1
330
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
170
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Six Lessons from altMBA
skipperchong
29
4.3k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
220
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
160
Done Done
chrislema
186
16k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
210
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
370
A designer walks into a library…
pauljervisheath
211
24k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
480
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