Commit graph

12 commits

Author SHA1 Message Date
Unai Martinez-Corral
652c755d37
Use golangci-lint (#1044)
Use golangci-lint. Repair warnings and errors resulting from linting.
2021-02-07 17:08:50 -07:00
John McBride
e392f3204d
Man pages won't have auto gen tag when option is disabled (#1104)
* Man pages wont have  auto gen tag when option is disabled

- this addresses #741

* Add documentation for doc generation and a changelog
2020-04-29 11:15:55 -06:00
James DeFelice
0ab5b6bcfc doc: hide hidden parent flags (#686)
* fixes #685
2018-04-24 12:15:12 -04:00
Albert Nigmatzianov
2da4a54c5c Improve tests in doc/ 2017-11-09 07:56:43 +01:00
Albert Nigmatzianov
de484eefb4 doc: Refactor man docs
Performance impact (very strange):
benchmark                        old ns/op     new ns/op     delta
BenchmarkGenManToFile-4          30037         29001         -3.45%

benchmark                        old allocs     new allocs     delta
BenchmarkGenManToFile-4          77             89             +15.58%

benchmark                        old bytes     new bytes     delta
BenchmarkGenManToFile-4          9075          9651          +6.35%
2017-04-26 21:30:17 +02:00
Albert Nigmatzianov
f95d58bdf3 Fix #401 (#402)
* doc: Add and edit docs

* doc: Add tests
2017-04-19 14:39:58 +02:00
Daniel Nephin
97206b3170 Use the correct man page section for the filename
Also make header mutation cleaner.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2016-06-21 14:30:54 -04:00
Daniel Nephin
112c7dca3a Hide deprecated shorthand flags in man page generation. 2016-06-21 14:30:26 -04:00
Ian Walter
a0bd6c17b3 Fixing golint warnings
* Moving final return outside of if-else
* Removing type declarations that Go can infer from values
* Cleaning up some existing comments
* Changing snake_case variables to camelCase
2016-03-31 09:53:34 -04:00
Garth Kidd
57f473263e Add explicit doc.GenMan SEE ALSO test covering #229 2016-01-21 12:12:26 +11:00
Daniel Martí
5df1341f93 Treat write errors in man doc generation
Just like the last commit, but now for manpages.

genMan still works with a buffer and returns []byte instead of working
directly with an io.Writer. This is because, in turn, md2man takes byte
slices instead of readers and writers.

Wrapping genMan around a writer is unnecessary especially since it's not
an exported function, and also because we'd still need a buffer to get
the output bytes.
2016-01-06 12:25:27 +01:00
Frank Schroeder
b3f29e98e6 Issue #195: Move doc generation into separate pkg
* Move man_docs and md_docs into new doc pkg
* Replace *bytes.Buffer with io.Writer
* Replace c == cmd.helpCommand with c.IsHelpCommand()
* Remove redundant len(children) == 0 check in HasSeeAlso
* Duplicate test setup for doc generation
2015-12-24 09:01:59 -05:00
Renamed from man_docs_test.go (Browse further)