Documentation
¶
Overview ¶
Package io provides low-level print primitives shared across write subpackages. It is not intended for direct use by callers outside internal/write/; domain write packages wrap these primitives with domain-specific function names.
Example usage from a domain write package:
// write/events/events.go
func JSON(cmd *cobra.Command, lines []string) {
writeIO.Lines(cmd, lines)
}
// write/stat/stat.go
func Table(cmd *cobra.Command, lines []string) {
writeIO.Lines(cmd, lines)
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Lines ¶
Lines prints each line to cmd's output. Nil cmd is a no-op.
This is a shared primitive used by domain write packages to avoid duplicating the nil-guard + range loop. Domain packages should provide their own exported function that delegates here.
Parameters:
- cmd: Cobra command for output
- lines: lines to print
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.