Skip to content

Conversation

@umputun
Copy link
Member

@umputun umputun commented Apr 6, 2025

Summary

  • Added FileWatcher to monitor files and directories for changes
  • Added WatchRecursive for recursive directory monitoring
  • Implemented Checksum function for file hash calculation with multiple algorithms
  • Created enum package for EventType and HashAlg enumerations
  • Updated CI workflow to use latest golangci-lint configuration
  • Added comprehensive documentation and examples
  • Fixed code to comply with linter requirements

umputun added 5 commits April 6, 2025 02:56
- Add FileWatcher to monitor files and directories for changes
- Add WatchRecursive for recursive directory monitoring
- Implement Checksum function for file hash calculation with multiple algorithms
- Add enum package for EventType and HashAlg enumerations
- Update CI workflow to use latest golangci-lint
- Add comprehensive documentation and examples
- Fix code to comply with linter requirements
@umputun umputun requested a review from Copilot April 6, 2025 08:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • go.mod: Language not supported

fileutils.go Outdated
}

// Checksum calculates the checksum of a file using the specified hash algorithm.
// Supported algorithms are MD5, SHA1, and SHA256.
Copy link

Copilot AI Apr 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment for the Checksum function lists only MD5, SHA1, and SHA256 as supported algorithms, but the implementation supports additional algorithms. Please update the comment to accurately reflect all supported hash algorithms.

Suggested change
// Supported algorithms are MD5, SHA1, and SHA256.
// Supported algorithms are MD5, SHA1, SHA224, SHA256, SHA384, SHA512, SHA512_224, and SHA512_256.

Copilot uses AI. Check for mistakes.
@umputun umputun merged commit 857dc8c into master Apr 6, 2025
3 checks passed
danyel pushed a commit to danyel/fileutils that referenced this pull request Oct 29, 2025
This caused golangci-lint config validation errors

Add file watcher and checksum functionality (go-pkgz#4)

* Add file watcher and checksum functionality

- Add FileWatcher to monitor files and directories for changes
- Add WatchRecursive for recursive directory monitoring
- Implement Checksum function for file hash calculation with multiple algorithms
- Add enum package for EventType and HashAlg enumerations
- Update CI workflow to use latest golangci-lint
- Add comprehensive documentation and examples
- Fix code to comply with linter requirements

* Fix test race condition in TestWatchRecursive

* Allow coveralls step to fail without failing the build

* Replace if-else-if chain with switch statement

* Fix formatting issue

* Update Checksum function comment to list all supported hash algorithms

feature: MkDir

added MkDir as a method on the fileutils

feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants