io

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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

func Lines(cmd *cobra.Command, lines []string)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL