Documentation
¶
Overview ¶
Package format renders file sizes and other journal metadata in human-readable form.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatSessionLink ¶
FormatSessionLink formats a Markdown list item linking to a page with a session count.
Parameters:
- label: Display text for the link
- slug: Link target without .md extension
- count: Number of sessions to display
Returns:
- string: Formatted line (e.g., "- [topic](topic.md) (3 sessions)\n")
func FormatSize ¶
FormatSize formats a file size in human-readable form.
Parameters:
- bytes: File size in bytes
Returns:
- string: Human-readable size (e.g., "512B", "1.5KB", "2.3MB")
func KeyFileSlug ¶
KeyFileSlug converts a file path to a safe slug for use as a filename.
Replaces /, . with _ and * with x.
Parameters:
- path: Original file path (e.g., "internal/config/*.go")
Returns:
- string: Safe slug (e.g., "internal_config_x_go")
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.