Documentation
¶
Overview ¶
Code Generation by ChatGPT o4-mini-high with this specification: 1. Core Layout
- Sections in order: NAME USAGE VERSION (app level only) DESCRIPTION COMMANDS (only user-defined, hide built-in "help") OPTIONS COPYRIGHT (app level only)
2. Section Headers
- "NAME:", "USAGE:", "VERSION:", "DESCRIPTION:", "COMMANDS:", "OPTIONS:" and "COPYRIGHT:" in bold green.
- Category headings (e.g. "Chord Options", "Gateway Options", "Global Options") in bold cyan, indented 2 spaces.
3. Wrapping & Indentation
- Wrap all free-form text (DESCRIPTION and each flag’s usage) at 160 columns.
- DESCRIPTION lines indented 3 spaces.
- Flags indented 2 spaces.
- Two-space gap between flag label and usage.
- Wrapped continuation lines of flag usage get an extra 2-space indent.
4. Flag Grouping & Ordering
- Group flags by their `Category` field (via reflection).
- Alphabetically sort categories (empty category labeled "Global Options").
- Within each category, preserve the order from the `Flags` slice.
5. Label Alignment
- Compute the maximum width of any flag label (e.g. "--foo BAR") across all categories.
- Right-pad every other label to that width so all usage columns start in the same column.
6. Help-flag & Help-command Suppression
- Skip any flag whose rendered label starts with `--help`.
- Skip the built-in `help` subcommand unless explicitly defined.
7. Color & Readability
- Use `fatih/color` for ANSI colors:
- Bright green for top-level headers.
- Cyan for category headings.
- Insert blank lines before each category and between major sections for breathing room.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOutboundIP ¶
func PrettierHelpPrinter ¶
func PrettierHelpPrinter()
PrettierHelpPrinter installs the templated HelpPrinter into urfave/cli.
Types ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
func NewBufferPool ¶
func NewBufferPool(size int) *BufferPool
func (*BufferPool) Get ¶
func (b *BufferPool) Get() []byte
func (*BufferPool) Put ¶
func (b *BufferPool) Put(buf []byte)
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bufconn provides a net.Conn implemented by a buffer and related dialing and listening functionality.
|
Package bufconn provides a net.Conn implemented by a buffer and related dialing and listening functionality. |
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
Click to show internal directories.
Click to hide internal directories.