Skip to content

Releases: LarsArtmann/go-output

v0.21.0

Choose a tag to compare

@github-actions github-actions released this 01 Jul 10:49

Full Changelog: v0.20.0...v0.21.0

v0.20.0

Choose a tag to compare

@github-actions github-actions released this 01 Jul 10:26

Full Changelog: v0.19.0...v0.20.0

v0.18.0

Choose a tag to compare

@github-actions github-actions released this 24 Jun 06:38

Full Changelog: v0.17.2...v0.18.0

v0.15.0

Choose a tag to compare

@github-actions github-actions released this 20 Jun 02:03

Full Changelog: v0.14.0...v0.15.0

v0.9.0

Choose a tag to compare

@LarsArtmann LarsArtmann released this 12 Jun 00:32

What's New

AnyDataMarshaler — render arbitrary data, not just TableData

New RenderAnyData() dispatch for rendering any Go value. JSON, YAML, and TOML register handlers automatically.

output.RenderAnyData(myStruct, output.FormatJSON, output.RenderOptions{})

All 16 formats now dispatch via RenderTableData()

D2, DOT, Mermaid, and PlantUML now register TableDataMarshaler via init(). Previously only 10 formats were registered.

Generic formatRegistry[T]

Thread-safe generic registry replaces 3 separate mutex+map patterns. Same formatRegistry[T] backs shape capabilities, table-data marshalers, and any-data marshalers.

AddRowChecked

err := data.AddRowChecked(row) // returns ErrColumnMismatch if column count differs from headers

NOM event constants

nom.EventWorkflowStarted  // instead of "workflow.started"
nom.EventActivityCompleted // instead of "activity.completed"

What's Changed

  • Added: RenderAnyData, RegisterAnyDataMarshaler, RegisteredAnyDataFormats, RegisteredTableDataFormats
  • Added: TableData.AddRowChecked() with column-count validation
  • Added: nom.Event* typed string constants
  • Added: D2, DOT, Mermaid, PlantUML register as TableDataMarshaler
  • Changed: Generic formatRegistry[T] replaces 3 mutex+map patterns
  • Changed: dt.Build() errors propagated instead of silently discarded
  • Changed: NOM timing cache async save errors now logged
  • Deprecated: delimited.MarshalTSV(data any) → use MarshalTSVFromTableData
  • Deprecated: graph.NewGraphNodeID/NewGraphNodeLabel → use output.NewBrandedID
  • Deprecated: nom.ParseActivityID/ParseWorkflowID → use direct type conversion

Full Changelog: v0.8.0...v0.9.0

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 25 May 22:50

Full Changelog: v0.4.0...v0.6.0

v0.4.0 — Public Release

Choose a tag to compare

@LarsArtmann LarsArtmann released this 16 May 22:19

go-output v0.4.0 — Public Release

A Go library that formats structured data into 12 output formats with type-safe enums and zero-config color support.

What's New

  • MIT License — fully open source
  • 27 doc comments added — all exported symbols documented for pkg.go.dev
  • README rewritten for general Go community audience
  • Dependencies clarified — root module has ZERO lipgloss dependencies

Supported Formats

Category Formats
Table table, json, csv, tsv, xml, markdown, yaml, d2
Tree tree, html
Graph d2, mermaid, dot

Quick Start

import "github.com/larsartmann/go-output"

md := output.NewMarkdownTable()
md.SetHeaders([]string{"Name", "Status"})
md.AddRow([]string{"go-output", "shipped"})
out, _ := md.Render()
fmt.Println(out)

Install

go get github.com/larsartmann/go-output