-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update logs and enhance ContentReader.ReadAll logic (#42)
* refact: improve overall log messsages and more - Improve the logic inside ContentReader.ReadAll Function - Add more description info for each error - Add success message to describe the size of the contents copied to the clipboard - Improve the format of the Usage page * chore: update package deps * test(reader): update reader.go tests * fix: tackles lint errors report by linter * refact(options): replace new line escape codes Replace new line escape codes with fmt.Fprintf(flag.CommandLine.Output()) for better readability as suggest by @ccoVeile * tests: improves the integration with testify * refact: upload package to store error messages Update some logical and structural problems in the code following the recommendations made by @ccoVeille * refact: Update cli/console/errors.go Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com> * test(reader): add descriptive error messages for better readability and debugging - Added detailed error messages to `require` and `assert` statements in `TestReadAll`, `TestReadable`, `TestIOReader`, `TestCreateContent`, and `TestJoinAll` - Improved context in test assertions to facilitate easier debugging and maintenance * refact(tests): strip declaration of unused var * chore: improve ErrFileNotFound message --------- Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
- Loading branch information
Showing
9 changed files
with
204 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package console | ||
|
||
import "errors" | ||
|
||
var ( | ||
ErrFileNotFound = errors.New("file does not exist or cannot be accessed") | ||
ErrReadingDirectories = errors.New("reading from directories is not currently supported") | ||
ErrPermissionDenied = errors.New("permission denied") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.