utils

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package common provides shared utilities for output plugins.

Package common provides shared utilities for output plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TemplateFuncs

func TemplateFuncs() template.FuncMap

TemplateFuncs returns standard template functions for all output plugins. This delegates to the public pkg/template.TemplateFuncs() to avoid duplication. Both internal and external plugins use the same template functions for consistency.

Types

type VerboseLogger

type VerboseLogger struct {
	// contains filtered or unexported fields
}

VerboseLogger implements a simple logger that writes to an io.Writer. This is used by output plugins that need to log verbose information. during template processing or generation.

func NewVerboseLogger

func NewVerboseLogger(out io.Writer) *VerboseLogger

NewVerboseLogger creates a new VerboseLogger that writes to the given writer.

func (*VerboseLogger) Printf

func (l *VerboseLogger) Printf(format string, v ...any)

Printf writes a formatted message to the logger's output writer. A newline is automatically appended to the format string.

Jump to

Keyboard shortcuts

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