utils

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmOverwrite

func ConfirmOverwrite(filePath string) bool

ConfirmOverwrite asks the user if they want to overwrite the file specified by filePath until they provide an acceptable answer. It returns true if the file should be overwritten, and false otherwise.

func FileExists

func FileExists(filePath string) (bool, error)

FileExists returns (true, nil) if the file specified by filePath exists, (false, nil) if it doesn't, or (false, err) if the file could not be accessed.

func PrintVersion

func PrintVersion(appVersion *semantika.Version)

PrintVersion prints the provided app version to the terminal.

func RequestUserPassword

func RequestUserPassword() string

RequestUserPassword allows the user to input a password while following security guidelines (minimum length, allowed characters, etc.).

func ValidatePassword

func ValidatePassword(psw string) bool

ValidatePassword evaluates the suitability of the provided password, returning true if the password is valid and false otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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