Add urfave_cli_no_docs build tag

This removes the resulting binary dependency on cpuguy83/md2man and
russross/blackfriday, which saves more than 400 KB (more than 300 KB
once stripped) from the resulting binary.

Document this in README.
This commit is contained in:
Kir Kolyshkin 2022-04-25 10:16:31 -07:00
parent aabfea87c8
commit 49e43beba3
3 changed files with 16 additions and 0 deletions

View File

@ -55,6 +55,16 @@ import (
...
```
### Build tags
You can use the following build tags:
#### `urfave_cli_no_docs`
When set, this removes `ToMarkdown` and `ToMan` methods, so your application
won't be able to call those. This reduces the resulting binary size by about
300-400 KB (measured using Go 1.18.1 on Linux/amd64), due to less dependencies.
### GOPATH
Make sure your `PATH` includes the `$GOPATH/bin` directory so your commands can

View File

@ -1,3 +1,6 @@
//go:build !urfave_cli_no_docs
// +build !urfave_cli_no_docs
package cli
import (

View File

@ -1,3 +1,6 @@
//go:build !urfave_cli_no_docs
// +build !urfave_cli_no_docs
package cli
import (