shared

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package shared provides common utilities for go-output examples.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleError

func HandleError(err error)

HandleError prints the error to stderr and exits with code 1.

func NewServiceD2Diagram

func NewServiceD2Diagram(title string) *d2.D2Diagram

NewServiceD2Diagram creates a D2 diagram with a service class pre-configured.

func RenderAndPrint added in v0.23.2

func RenderAndPrint(r output.Renderer)

RenderAndPrint runs r.Render() and prints the result, routing any error through HandleError. Centralises the "Render() + check error + println" sequence shared by every go-output example entrypoint.

Types

This section is empty.

Jump to

Keyboard shortcuts

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