utils

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SuccessMessage = lipgloss.NewStyle().
					Bold(true).
					Foreground(lipgloss.Color("#22c55e")).SetString("")

	WarningMessage = lipgloss.NewStyle().
					Bold(true).
					Foreground(lipgloss.Color("#f97316")).SetString("")

	ErrorMessage = lipgloss.NewStyle().
					Bold(true).
					Foreground(lipgloss.Color("#ff5733")).SetString("")
)
View Source
var Logger = log.NewWithOptions(os.Stderr, log.Options{
	ReportTimestamp: false,
})

Functions

func CheckFileExists

func CheckFileExists(dir string, fileName string) (bool, error)

func CopyFile

func CopyFile(source, destination string) error

func GetBackupTimestamp

func GetBackupTimestamp() string

func GetCurrentWorkingDirectory

func GetCurrentWorkingDirectory() string

func IsFsDirectory

func IsFsDirectory(sourcePath string) (bool, error)

func Mkdir

func Mkdir(path string) error

func OpenInEditor

func OpenInEditor(filePath string) error

func OpenInFinder

func OpenInFinder(dirPath string) error

func ReadDirRecursive

func ReadDirRecursive(dirPath string) ([]string, error)

Types

type Directory

type Directory struct {
	Name  string
	Value string
}

func GetDirectories

func GetDirectories(directory string) ([]Directory, error)

Jump to

Keyboard shortcuts

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