Documentation ¶
Overview ¶
Package utils provides common utility functions for the BastionBuddy application, including menu handling, user input, and Azure CLI command execution.
Index ¶
- func AzureCommand(args ...string) ([]byte, error)
- func AzureInteractiveCommand(args ...string) error
- func AzureSetSubscription(subscriptionID string) error
- func CheckDependencies() error
- func ExtractIDFromParentheses(input string) (string, error)
- func ReadInput(prompt string) (string, error)
- func SelectWithMenu(items []string, prompt string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AzureCommand ¶
AzureCommand executes an Azure CLI command with the given arguments. It returns the command output and any error that occurred.
func AzureInteractiveCommand ¶
AzureInteractiveCommand executes an Azure CLI command that requires user interaction. It returns any error that occurred during command execution.
func AzureSetSubscription ¶
AzureSetSubscription sets the active Azure subscription. It returns any error that occurred during the operation.
func CheckDependencies ¶
func CheckDependencies() error
CheckDependencies verifies that all required external dependencies are available. Currently checks for the Azure CLI (az) command.
func ExtractIDFromParentheses ¶
ExtractIDFromParentheses extracts an ID from a string that contains it within parentheses. For example, "Resource Group (12345)" returns "12345".
Types ¶
This section is empty.