API Functions
Ziva provides a rich set of global functions for configuring library behavior, optimizing performance, and advanced usage.These functions complement the core library components and allow fine-tuning Ziva behavior for your specific application requirements.
Auto-configuration
AutoConfigure()
Automatically configures Ziva for optimal performance on the current system.- Analyzes available system memory
- Detects processor architecture
- Optimizes settings for embedded systems
- Configures caching and buffering
DisableCompletionDelay()
Turns off the default completion delay that keeps the last task on screen for a short moment.Is64Bit()
Determines system architecture for optimal algorithm selection.Performance Utilities
RepeatEfficient(s string, count int) string
Creates a string by efficiently repeating the base string.JoinEfficient(parts []string, separator string) string
Joins strings with minimal memory allocations.FastConcat(parts …string) string
Fast concatenation of arbitrary number of strings.CleanWhitespaceEfficient(s string) string
Cleans string from excessive whitespace characters.Color Management
SetErrorColor(errorsColor, statusColor lipgloss.TerminalColor)
Configures color scheme for error display.ResetErrorColors()
Resets error colors to default values.SetExitMenuItemStyle(style lipgloss.Style)
Changes the style used to render localized “Exit” menu items in list tasks. By default Ziva highlights the action with a cyan bold style (ziva.MenuActionDefaultStyle()).