utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Info = Teal
	Warn = Yellow
	Fata = Red
	Pur  = Purple
	Tea  = Teal
)
View Source
var (
	Black   = Color("\033[1;30m%s\033[0m")
	Red     = Color("\033[1;31m%s\033[0m")
	Green   = Color("\033[1;32m%s\033[0m")
	Yellow  = Color("\033[1;33m%s\033[0m")
	Purple  = Color("\033[1;34m%s\033[0m")
	Magenta = Color("\033[1;35m%s\033[0m")
	Teal    = Color("\033[1;36m%s\033[0m")
	White   = Color("\033[1;37m%s\033[0m")
)

Functions

func Color

func Color(colorString string) func(...interface{}) string

func CopyFile

func CopyFile(src, dst string) error

func Countdown

func Countdown(seconds int64)

func ExistsDir

func ExistsDir(dir string) bool

func ExistsFile

func ExistsFile(file string) bool

func GetFileHash

func GetFileHash(path string) (string, error)

func GetLastDirName

func GetLastDirName(src string, isDir bool) (string, error)

func GetPerm

func GetPerm(name string) (fs.FileMode, error)

func ListAllFiles

func ListAllFiles(dir string) ([]string, error)

func ListFolderFiles

func ListFolderFiles(dir string) ([]string, error)

func Mkdir

func Mkdir(path string) error

func RemoveAll

func RemoveAll(path string) error

func SetPerm

func SetPerm(name string, perm fs.FileMode) error

Types

type CommandUtils

type CommandUtils struct {
}

func (CommandUtils) PressAnyKeyToContinue

func (CommandUtils) PressAnyKeyToContinue()

Jump to

Keyboard shortcuts

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