Fix/watcher spelling and path logic#343
Open
Ansita20 wants to merge 2 commits into
Open
Conversation
Signed-off-by: ansita20 <ansitasingh20@gmail.com>
Signed-off-by: ansita20 <ansitasingh20@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR addresses typos in exported constructor names and fixes the import command’s path normalization order so uploaded artifact paths match watcher configuration paths (Fixes #342).
Changes:
- Renamed
cmd.NewCommad()tocmd.NewCommand()(command constructor typo fix). - Renamed
watcher.NewWatchManger()towatcher.NewWatchManager()(constructor naming consistency). - Normalized
./file path prefixes before callingUploadArtifact()to keep upload and watch-config paths consistent.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| watcher/main.go | Updates watcher binary to use NewWatchManager() constructor. |
| pkg/watcher/watchManager.go | Renames the watcher constructor to NewWatchManager(). |
| cmd/import.go | Moves ./ prefix trimming before upload; updates watcher constructor call. |
| cmd/cmd.go | Renames CLI root command constructor to NewCommand(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -22,7 +22,7 @@ import ( | |||
| "github.com/spf13/cobra" | |||
| ) | |||
|
|
|||
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request fixes several code quality and logic issues in the Microcks CLI.
Changes included:
NewCommad()toNewCommand().NewWatchManger()toNewWatchManager()for consistency with the struct name.importcommand so that./prefixes are removed before callingUploadArtifact(). This ensures consistent paths between uploaded artifacts and watcher configuration.These fixes improve compilation reliability, code readability, and correct watcher behavior in watch mode.
Changes
Command Constructor Fix
NewCommad()→NewCommand()WatchManager Constructor Fix
NewWatchManger()→NewWatchManager()File Path Normalization Fix
UploadArtifact()call.Testing
importcommand works correctly with normalized file paths.Related issue(s)
Fixes #342