Add godoc strings to all exported types, functions, and fields
Documents: - cli: NO_COLOR, RunOptions fields, CLIApp, VersionString - checker: Result fields, Status constants, CheckStatus fields - scanner: EnumerateStatus, ScanStatus, Options, FileEntry fields - log: Level alias, DisableStyling, Init, Info/Debug functions, verbosity helpers, GetLogger, GetLevel, WithError - mfer: ManifestScanOptions, New, NewFromPaths, NewFromFS, MAGIC
This commit is contained in:
@@ -16,21 +16,21 @@ import (
|
||||
|
||||
// Result represents the outcome of checking a single file.
|
||||
type Result struct {
|
||||
Path string
|
||||
Status Status
|
||||
Message string
|
||||
Path string // Relative path from manifest
|
||||
Status Status // Verification result status
|
||||
Message string // Human-readable description of the result
|
||||
}
|
||||
|
||||
// Status represents the verification status of a file.
|
||||
type Status int
|
||||
|
||||
const (
|
||||
StatusOK Status = iota
|
||||
StatusMissing
|
||||
StatusSizeMismatch
|
||||
StatusHashMismatch
|
||||
StatusExtra // File exists on disk but not in manifest
|
||||
StatusError
|
||||
StatusOK Status = iota // File matches manifest (size and hash verified)
|
||||
StatusMissing // File not found on disk
|
||||
StatusSizeMismatch // File size differs from manifest
|
||||
StatusHashMismatch // File hash differs from manifest
|
||||
StatusExtra // File exists on disk but not in manifest
|
||||
StatusError // Error occurred during verification
|
||||
)
|
||||
|
||||
func (s Status) String() string {
|
||||
@@ -54,12 +54,12 @@ func (s Status) String() string {
|
||||
|
||||
// CheckStatus contains progress information for the check operation.
|
||||
type CheckStatus struct {
|
||||
TotalFiles int64
|
||||
CheckedFiles int64
|
||||
TotalBytes int64
|
||||
CheckedBytes int64
|
||||
BytesPerSec float64
|
||||
Failures int64
|
||||
TotalFiles int64 // Total number of files in manifest
|
||||
CheckedFiles int64 // Number of files checked so far
|
||||
TotalBytes int64 // Total bytes to verify (sum of all file sizes)
|
||||
CheckedBytes int64 // Bytes verified so far
|
||||
BytesPerSec float64 // Current throughput rate
|
||||
Failures int64 // Number of verification failures encountered
|
||||
}
|
||||
|
||||
// Checker verifies files against a manifest.
|
||||
|
||||
Reference in New Issue
Block a user