utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatOutputWithWarning

func FormatOutputWithWarning(text string) string

FormatOutputWithWarning formats output with warning if cache integrity is compromised This is a helper function to ensure consistent output formatting in commands

func IsSiteCode

func IsSiteCode(s string) bool

IsSiteCode checks if a string matches the site code format \w{2}\-\w{3,4}\-\w{1,10}

func IsUUID

func IsUUID(s string) bool

IsUUID checks if a string is likely a UUID

func MaskString

func MaskString(s string) string

MaskString masks sensitive information like API tokens This is a wrapper around common.MaskString for backward compatibility

func PrintDetailWithWarning

func PrintDetailWithWarning(format string, args ...interface{})

PrintDetailWithWarning prints a detail line (like ID, Name, etc.) without applying blue color Use this for detail lines that should appear in regular text formatting

func PrintTextWithWarning

func PrintTextWithWarning(text string)

PrintTextWithWarning prints a text string with warning if cache integrity is compromised Use this function when you have a pre-formatted string (not a format string) Section headings are displayed in blue

func PrintWithWarning

func PrintWithWarning(format string, args ...interface{})

PrintWithWarning prints a line of text with warning if cache integrity is compromised Section headings are displayed in blue

func PromptForConfirmation

func PromptForConfirmation(message string) bool

PromptForConfirmation asks the user for confirmation and returns true if confirmed

func ResolveSiteID

func ResolveSiteID(ctx context.Context, client api.Client, cfg *config.Config, identifier string) (string, error)

ResolveSiteID attempts to resolve a site identifier to a UUID based on the provided format rules

func ResolveSiteIDViper

func ResolveSiteIDViper(ctx context.Context, client api.Client, identifier string) (string, error)

ResolveSiteIDViper attempts to resolve a site identifier to a UUID using Viper for config

Types

This section is empty.

Jump to

Keyboard shortcuts

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