shared

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatSize

func FormatSize(bytes int64) string

FormatSize formats bytes into human-readable size

func GroupByCategory

func GroupByCategory(files []types.FileEntry) map[string][]types.FileEntry

GroupByCategory groups file entries by their category

func Join

func Join(parts []string, sep string) string

Join concatenates strings with a separator

func MarshalIndentNoEscape

func MarshalIndentNoEscape(v any, prefix, indent string) ([]byte, error)

MarshalIndentNoEscape marshals JSON with indentation but without HTML escaping. This prevents <, >, and & from being escaped to \u003c, \u003e, and \u0026. Unlike json.MarshalIndent which hard-codes escapeHTML: true, this function uses an Encoder with SetEscapeHTML(false) to produce cleaner output for CLI contexts.

func OutputFormatToString

func OutputFormatToString(format integrations.OutputFormat) (string, error)

OutputFormatToString converts an OutputFormat to a formatter string. Returns the format string (e.g., "xml", "json") or an error for unsupported formats.

Types

This section is empty.

Jump to

Keyboard shortcuts

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