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:
@@ -21,8 +21,8 @@ import (
|
||||
|
||||
// EnumerateStatus contains progress information for the enumeration phase.
|
||||
type EnumerateStatus struct {
|
||||
FilesFound int64
|
||||
BytesFound int64
|
||||
FilesFound int64 // Number of files discovered so far
|
||||
BytesFound int64 // Total size of discovered files (from stat)
|
||||
}
|
||||
|
||||
// Phase 2: Scan (ToManifest)
|
||||
@@ -32,27 +32,27 @@ type EnumerateStatus struct {
|
||||
|
||||
// ScanStatus contains progress information for the scan phase.
|
||||
type ScanStatus struct {
|
||||
TotalFiles int64
|
||||
ScannedFiles int64
|
||||
TotalBytes int64
|
||||
ScannedBytes int64
|
||||
BytesPerSec float64
|
||||
TotalFiles int64 // Total number of files to scan
|
||||
ScannedFiles int64 // Number of files scanned so far
|
||||
TotalBytes int64 // Total bytes to read (sum of all file sizes)
|
||||
ScannedBytes int64 // Bytes read so far
|
||||
BytesPerSec float64 // Current throughput rate
|
||||
}
|
||||
|
||||
// Options configures scanner behavior.
|
||||
type Options struct {
|
||||
IgnoreDotfiles bool
|
||||
FollowSymLinks bool
|
||||
Fs afero.Fs // Filesystem to use, defaults to OsFs
|
||||
IgnoreDotfiles bool // Skip files and directories starting with a dot
|
||||
FollowSymLinks bool // Resolve symlinks instead of skipping them
|
||||
Fs afero.Fs // Filesystem to use, defaults to OsFs if nil
|
||||
}
|
||||
|
||||
// FileEntry represents a file that has been enumerated.
|
||||
type FileEntry struct {
|
||||
Path string // Relative path (used in manifest)
|
||||
AbsPath string // Absolute path (used for reading file content)
|
||||
Size int64
|
||||
Mtime time.Time
|
||||
Ctime time.Time
|
||||
Path string // Relative path (used in manifest)
|
||||
AbsPath string // Absolute path (used for reading file content)
|
||||
Size int64 // File size in bytes
|
||||
Mtime time.Time // Last modification time
|
||||
Ctime time.Time // Creation time (platform-dependent)
|
||||
}
|
||||
|
||||
// Scanner accumulates files and generates manifests from them.
|
||||
|
||||
Reference in New Issue
Block a user