goharbor / harbor-cli

[Sandbox] Official Harbor CLI
Apache License 2.0
31 stars 37 forks source link

Added the metadata command inside project command. #92

Open muaz-32 opened 3 months ago

muaz-32 commented 3 months ago

Fixes: #91

The metadata will be added directly using the command, without using the interactive cmd. This is the fastest way to add metadata, so it has a better user experience. For example: project metadata add [NAME|ID] ...[KEY]:[VALUE] The same idea is used for other metadata commands.

flag: --id which means whether the argument is project ID or not. It is beneficial when a project's name is the same as another project's ID.

muaz-32 commented 2 months ago

Thank you ! Please check out the latest changes we've made, they significantly improve how the handler is used

I have updated it accordingly. Also, I am updating my other PRs.

muaz-32 commented 2 months ago

Thank you ! Please check out the latest changes we've made, they significantly improve how the handler is used

Regarding the new changes, how should the flags be handled? For example this PR has the isBool flag, but most other commands do not have it. So the isBool flag is not included in the ListFlags struct. I think we can create individual structs for the commands. WDYT?