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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
110
Stateful Solutions: A Hands-On Guide to FSM in Golang
dreamworm
0
210
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
160
How To Create Saga-Free Distributed Transactions
dreamworm
0
81
Architectural decisions in building distributed systems
dreamworm
0
43
Распределенные транзакции без саг
dreamworm
0
210
Other Decks in Programming
See All in Programming
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
150
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
14
6.8k
AIエージェントで 変わるAndroid開発環境
takahirom
2
490
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
160
共通化で考えるべきは、実装より公開する型だった
codeegg
0
210
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
510
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
460
OS アップデート対応の取り組み方がもっと共有されてほしい
andpad
0
110
Vite+ Unified Toolchain for the Web
naokihaba
0
740
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.8k
【やさしく解説 設計編 #1】「ドメイン駆動」と「実装駆動」ってなに? 〜設計の考え方を、たとえ話で学ぼう〜
panda728
PRO
1
110
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
190
How to build a perfect <img>
jonoalderson
1
5.8k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
210
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Context Engineering - Making Every Token Count
addyosmani
9
1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
460
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Facilitating Awesome Meetings
lara
57
7k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Unsuck your backbone
ammeep
672
58k
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