ui

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blank

func Blank()

Blank prints an empty line

func Bold

func Bold(text string) string

func CheckFail

func CheckFail(format string, args ...any)

CheckFail prints a failed check item

func CheckOK

func CheckOK(format string, args ...any)

CheckOK prints a successful check item

func Gray

func Gray(text string) string

func Green

func Green(text string) string
func Header(title string)

Header prints a section header with underline

func Info

func Info(format string, args ...any)

Info prints an info message

func Println

func Println(format string, args ...any)

Println prints a plain line

func Red

func Red(text string) string

func Success

func Success(format string, args ...any)

Success prints a success message

func Warn

func Warn(format string, args ...any)

Warn prints a warning message

func Yellow

func Yellow(text string) string

Types

type Error

type Error struct {
	Message   string   // Primary error message
	Reasons   []string // Possible reasons for the error
	Solutions []string // Suggested solutions
	Command   string   // The command that failed (optional)
	Output    string   // Command output or additional details (optional)
}

Error represents a user-facing error with context

func ErrAlreadyUsingVersion

func ErrAlreadyUsingVersion(version string) *Error

func ErrBackupFailed

func ErrBackupFailed(err error) *Error

func ErrCannotUninstallCurrent

func ErrCannotUninstallCurrent(version string) *Error

func ErrCannotUninstallOnlyVersion

func ErrCannotUninstallOnlyVersion(version string) *Error

func ErrClaudeNotInstalled

func ErrClaudeNotInstalled() *Error

func ErrCreateDirFailed

func ErrCreateDirFailed(path string, err error) *Error

func ErrHomeDirNotFound

func ErrHomeDirNotFound(err error) *Error

func ErrInvalidVersion

func ErrInvalidVersion(reason string) *Error

func ErrNodeModulesNotFound

func ErrNodeModulesNotFound() *Error

func ErrNpmInstallFailed

func ErrNpmInstallFailed(version, command, output string) *Error

func ErrNpmNotFound

func ErrNpmNotFound() *Error

func ErrRemoveNodeModulesFailed

func ErrRemoveNodeModulesFailed(err error) *Error

func ErrRunningAsRoot

func ErrRunningAsRoot() *Error

func ErrSwitchVerifyFailed

func ErrSwitchVerifyFailed(version string) *Error

func ErrSymlinkFailed

func ErrSymlinkFailed(err error) *Error

func ErrUninstallFailed

func ErrUninstallFailed(version string, err error) *Error

func ErrUnsupportedPlatform

func ErrUnsupportedPlatform() *Error

func ErrVerifyInstallFailed

func ErrVerifyInstallFailed(version, expected, actual string) *Error

func ErrVersionAlreadyInstalled

func ErrVersionAlreadyInstalled(version string) *Error

func ErrVersionDirNotFound

func ErrVersionDirNotFound(version string) *Error

func ErrVersionNotFound

func ErrVersionNotFound(version string) *Error

func ErrVersionNotInstalled

func ErrVersionNotInstalled(version string) *Error

func ErrWriteFileFailed

func ErrWriteFileFailed(path string, err error) *Error

func (*Error) Error

func (e *Error) Error() string

Error implements the error interface

func (*Error) Print

func (e *Error) Print()

Print outputs the error in a formatted style

Jump to

Keyboard shortcuts

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