output

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyJQ

func ApplyJQ(data any, expr string) (any, error)

ApplyJQ runs a jq expression against data and returns the result. If the expression produces a single value, it is returned unwrapped. Multiple values are collected into a slice.

func CSV

func CSV(w io.Writer, data any) error

func CSVWithHeaders added in v0.0.2

func CSVWithHeaders(w io.Writer, data any, headers []string) error

func JSON

func JSON(w io.Writer, data any) error

func Render

func Render(w io.Writer, format Format, data any) error

Types

type Format

type Format string
const (
	FormatJSON Format = "json"
	FormatCSV  Format = "csv"
)

Jump to

Keyboard shortcuts

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