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
54
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
190
Distributed System State Management: When Transactions Are Long and SLA Is High
dreamworm
0
180
How To Create Saga-Free Distributed Transactions
dreamworm
0
100
Architectural decisions in building distributed systems
dreamworm
0
56
Распределенные транзакции без саг
dreamworm
0
230
Other Decks in Programming
See All in Programming
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.1k
Agents on Rails - Rails at Scale 2026
irinanazarova
0
530
Are APIs Still Relevant in the AI Era?
soyuka
0
460
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
720
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
490
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
560
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
980
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
200
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
160
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
Featured
See All Featured
For a Future-Friendly Web
brad_frost
184
10k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
570
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
520
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Designing for humans not robots
tammielis
254
26k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Navigating Team Friction
lara
192
16k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
360
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
30 Presentation Tips
portentint
PRO
1
430
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