Documentation ¶
Index ¶
Constants ¶
const ( OutputModeTextFile = "text" OutputModeCsvFile = "csv" OutputModeStdOut = "print" OutputModeJSON = "json" )
Different output modes
Variables ¶
var OutputModes = map[string]string{ OutputModeTextFile: "creates a text file in current directory with basic information", OutputModeCsvFile: "creates a csv file in current directory with detailed information", OutputModeStdOut: "just prints the report without creating any file", OutputModeJSON: "creates a JSON file in the current directory with basic information", }
OutputModes and their brief descriptions
Functions ¶
func FileDigestComparator ¶
FileDigestComparator is a comparator for FileDigest that compares FileSize, FileExtension and FileHash in that order
Types ¶
type DigestToFiles ¶
type DigestToFiles struct {
// contains filtered or unexported fields
}
DigestToFiles is a multi-map with FileDigest keys and string values. Writes to this is goroutine-safe.
func NewDigestToFiles ¶
func NewDigestToFiles() (m *DigestToFiles)
NewDigestToFiles creates new DigestToFiles
func (*DigestToFiles) Iterator ¶
func (m *DigestToFiles) Iterator() *digestToFilesIterator
Iterator returns an iterator for a DigestToFiles map
func (*DigestToFiles) Remove ¶
func (m *DigestToFiles) Remove(fd FileDigest)
Remove removes entry in the map
func (*DigestToFiles) Set ¶
func (m *DigestToFiles) Set(key FileDigest, value string)
Set sets a value for the key
type FileDigest ¶
type FileDigest struct { FileExtension string `json:"ext"` FileSize int64 `json:"size"` FileHash string `json:"hash"` }
FileDigest contains properties of a file that makes the file unique to a very high degree of confidence
func (FileDigest) String ¶
func (f FileDigest) String() string
String returns a string representation of FileDigest
type FileExtAndSize ¶
FileExtAndSize is a struct of file extension and file size
func (FileExtAndSize) String ¶
func (f FileExtAndSize) String() string
String returns a string representation of FileExtAndSize
type FileExtAndSizeToFiles ¶
type FileExtAndSizeToFiles map[FileExtAndSize][]string
FileExtAndSizeToFiles is a multi-map of FileExtAndSize key and string values
type FilePathToMeta ¶
FilePathToMeta is a map of file path to its FileMeta