-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regroup the command implementations in respective sub-packages #66
Comments
So I took at pass at this when I was doing the
Bottom line is that it's not hard to do just requires agreement and one swoop change. If you guys want this before milestone 1 I could do this this week, while you all asleep in Europe. I'll add this to the agenda tomorrow as a low priority issue. /cc @sixolet @cppforlife |
IMO, we should aim this as first thing after v0.1. |
@maximilien Is this something you are already on ? I'm asking while I'm working on #14 I also want to split up and separate the commands better (as I want to use some some package scoped vars which shouldn't 'pollute' whole "commands"). I agree that we need a "common" package which should hold the shared code, e.g. As I'm on it as well, I would be happy also to take over this task if you don't have a chance to come to is soonish. (there are some other subtle things like how to register subcommands and also the human-readable printers now reference commands directly). In any case, we should tackle this issue very soon. |
OK as per discussion today. Let me submit something today. I am sure you guys will have lots of feedback. More soon. |
Adds three new packages: 1. kn/commands/common - includes common stuff between commands 2. kn/commands/service - includes all kn service * commands 3. kn/commands/revision - includes all kn revision * commands Overall worked fine. I have two things I don't like but that I think should be done as refactor. I'll mention them in comments for discussions.
Creates three subpackages for now: 1. kn/commands/common - inludes types.go for common struct. Also includes humman_readable_flags.go which could be split into the specific command package. But I would do this as a refactor later 2. kn/commands/service - all 'kn service *' commands 3. kn/commands/revision - all 'kn revision *' commands
Creates three subpackages for now: 1. kn/commands/common - inludes types.go for common struct and other common files 2. kn/commands/service - all 'kn service *' commands 3. kn/commands/revision - all 'kn revision *' commands
Done in #145 |
Creates four subpackages for now: 1. kn/commands/common - inludes types.go for common struct and other common files 2. kn/commands/service - all 'kn service *' commands 3. kn/commands/revision - all 'kn revision *' commands 4. kn/core - contains the root.go and other top level for code and testing
Creates four subpackages for now: 1. kn/commands/common - inludes types.go for common struct and other common files 2. kn/commands/service - all 'kn service *' commands 3. kn/commands/revision - all 'kn revision *' commands 4. kn/core - contains the root.go and other top level for code and testing
Creates four subpackages for now: 1. kn/commands/common - inludes types.go for common struct and other common files 2. kn/commands/service - all 'kn service *' commands 3. kn/commands/revision - all 'kn revision *' commands 4. kn/core - contains the root.go and other top level for code and testing Had to refactor all tests to avoid cycles.
Creates four subpackages for now: 1. kn/commands/common - inludes types.go for common struct and other common files 2. kn/commands/service - all 'kn service *' commands 3. kn/commands/revision - all 'kn revision *' commands 4. kn/core - contains the root.go and other top level for code and testing Had to refactor all tests to avoid cycles.
Creates four subpackages for now: 1. kn/commands - inludes types.go for common struct and other common files and misc commands 2. kn/commands/service - all 'kn service *' commands 3. kn/commands/revision - all 'kn revision *' commands 4. kn/core - contains the root.go and other top level for code and testing 5. refactors: a. split .../commons/human_readable_flags.go into three b. modifies the HumanReadableFlags.ToPrinter to get pass a function that sets the columns and fields Had to refactor all tests to avoid cycles.
Creates four subpackages for now: 1. kn/commands - inludes types.go for common struct and other common files and misc commands 2. kn/commands/service - all 'kn service *' commands 3. kn/commands/revision - all 'kn revision *' commands 4. kn/core - contains the root.go and other top level for code and testing 5. refactors: a. split .../commons/human_readable_flags.go into three b. modifies the HumanReadableFlags.ToPrinter to get pass a function that sets the columns and fields Had to refactor all tests to avoid cycles.
Creates four subpackages for now: 1. kn/commands - inludes types.go for common struct and other common files and misc commands 2. kn/commands/service - all 'kn service *' commands 3. kn/commands/revision - all 'kn revision *' commands 4. kn/core - contains the root.go and other top level for code and testing 5. refactors: a. split .../commons/human_readable_flags.go into three b. modifies the HumanReadableFlags.ToPrinter to get pass a function that sets the columns and fields Had to refactor all tests to avoid cycles.
Creates four subpackages for now: 1. kn/commands - inludes types.go for common struct and other common files and misc commands 2. kn/commands/service - all 'kn service *' commands 3. kn/commands/revision - all 'kn revision *' commands 4. kn/core - contains the root.go and other top level for code and testing 5. refactors: a. split .../commons/human_readable_flags.go into three b. modifies the HumanReadableFlags.ToPrinter to get pass a function that sets the columns and fields Had to refactor all tests to avoid cycles.
This is completed, thanks @maximilien ! |
* Add a function to check links in markdown files Bonus: make header/subheader nicer and factor out banner creation. * Fix and add comments * Document make_banner
Presently, all the command implementations reside under
pkg/kn/commands/
, we should re-group the implementations based on command-group.for eg:
pkg/kn/commands/service/
<-- implementing all the sub-commands underkn service
pkg/kn/commands/revision/
pkg/kn/commands/build/
pkg/kn/commands/
and so on..
The text was updated successfully, but these errors were encountered: