Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Godoc: хороший, плохой, злой
Search
Ilya Kaznacheev
July 18, 2020
Programming
62
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
51
Many Layers of Availability
dreamworm
0
120
Stateful Solutions: A Hands-On Guide to FSM in Golang
dreamworm
0
230
CQRS
dreamworm
0
210
Building a Cloud-Native PaaS
dreamworm
0
180
Distributed System State Management: When Transactions Are Long and SLA Is High
dreamworm
0
180
How To Create Saga-Free Distributed Transactions
dreamworm
0
98
Architectural decisions in building distributed systems
dreamworm
0
54
Распределенные транзакции без саг
dreamworm
0
230
Other Decks in Programming
See All in Programming
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.5k
Are APIs Still Relevant in the AI Era?
soyuka
0
420
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
440
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
290
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
230
Security issues being discussed on Web Platforms
petamoriken
0
1.4k
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
20
21k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
440
The Rails Doctrine Decade
koic
2
490
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
620
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
150
MVNOの申込からeSIM開通までをiOSアプリでつなぐ- 本人確認・MNP・通信事業者基盤をまたぐ実装
satotakeshi
0
540
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
260
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
250
The World Runs on Bad Software
bkeepers
PRO
72
12k
Writing Fast Ruby
sferik
630
63k
A Tale of Four Properties
chriscoyier
163
24k
Product Roadmaps are Hard
iamctodd
55
13k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
350
HDC tutorial
michielstock
2
940
Crafting Experiences
bethany
1
370
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