Documentation
¶
Overview ¶
Package helpers provides shared utility functions used across the application. These are generic helpers that don't belong to a specific domain package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountUniqueStrings ¶
CountUniqueStrings returns the number of unique strings in a slice. Useful for counting unique URLs or other string collections.
func TruncateText ¶
TruncateText shortens text to the specified maximum length, adding "..." if truncated. Returns empty string if input is empty or only whitespace. If maxLen is less than 4, returns the original text (can't fit "..." plus content).
func TruncateURL ¶
TruncateURL shortens a URL to the specified maximum length for display purposes. Adds "..." suffix if the URL exceeds maxLen.
Types ¶
This section is empty.