app

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AppName is the name of the application
	AppName = "go-dupfinder"
	// Version is the version of the application
	Version = "dev"
	// CommitHash is the last commit hash when the application is built
	CommitHash = "none"
	// BuildDate is the date when the application is built
	BuildDate = "unknown"
)

Functions

func Confirm

func Confirm(message string) bool

Confirm will prompt to user for yes or no

func ContainsString

func ContainsString(s []string, e string) bool

ContainsString check if string exists in array of string

func DeleteAllFiles

func DeleteAllFiles(files []string)

DeleteAllFiles will delete all files in array

func DeleteFile

func DeleteFile(path string) error

DeleteFile will delete a file

func GetDuplicateFiles

func GetDuplicateFiles(AllFiles []string, uniqueFiles []string) []string

GetDuplicateFiles return duplicate files

func GetFileName

func GetFileName(path string) string

GetFileName will return the file name from a directory path

func GetFiles

func GetFiles(path string) ([]string, error)

GetFiles will return the file name from a directory path

func GetUniqueFiles

func GetUniqueFiles(hashMap map[string]string, hash []string) []string

GetUniqueFiles return unique files

func IsDir

func IsDir(path string) (bool, error)

IsDir check if a given path is file or directory

func IsValidPath

func IsValidPath(path string) (bool, error)

IsValidPath check if the path is valid

func ListDir

func ListDir(path string) ([]fs.FileInfo, error)

ListDir will walk through directory

func PrintFiles

func PrintFiles(filePaths []string)

PrintFiles will print files in pretter style

func Sha256sum

func Sha256sum(filename string) (string, error)

Sha256sum will hash the file and return the sha256sum

Types

This section is empty.

Jump to

Keyboard shortcuts

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