Documentation ¶
Index ¶
- func CreateDirTable(rows []HashResults, algo string) *tablewriter.Table
- func CreateTable(rows []HashResults, algo string) *tablewriter.Table
- func HandleOutput(op []HashResults, h string, format string, isDir bool, clearFooter bool)
- func IsDirectory(fileName string) bool
- func ReturnFilesInFolder(folder string) []string
- type HashResults
- type JSONHashResults
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDirTable ¶ added in v0.0.3
func CreateDirTable(rows []HashResults, algo string) *tablewriter.Table
CreateDirTable returns a two column table to render
func CreateTable ¶
func CreateTable(rows []HashResults, algo string) *tablewriter.Table
CreateTable returns a formatted table to render
func HandleOutput ¶ added in v0.0.7
func HandleOutput(op []HashResults, h string, format string, isDir bool, clearFooter bool)
HandleOutput is used to provide the output in the required format
func IsDirectory ¶ added in v0.0.3
func ReturnFilesInFolder ¶ added in v0.0.3
Types ¶
type HashResults ¶
HashResults store the computed hash of a filename
func GetHashesForFiles ¶ added in v0.0.7
func GetHashesForFiles(files []string, algo string) []HashResults
GetHashesForFiles returns the hashes for a given set of files
func HashesAreEqual ¶ added in v0.0.3
func HashesAreEqual(hr1 []HashResults, hr2 []HashResults) (bool, []HashResults)
type JSONHashResults ¶ added in v0.0.7
type JSONHashResults struct { Results []HashResults `json:"results"` Match bool `json:"matched"` Algo string `json:"algo"` }
JSONHashResults are a json representation of the results
Click to show internal directories.
Click to hide internal directories.