joyent / kosh

Second-generation shell for accessing the Conch API
Mozilla Public License 2.0
2 stars 5 forks source link

Massive Refactor of Kosh's internals #66

Closed perigrin closed 4 years ago

perigrin commented 4 years ago

When kosh was first refactored from conch-shell it was the only go-based application talking to the API. So it made no sense to continue to maintain a separate package to wrap the upstream API. However going forward there will be more go based conch applications so having the conch library return is important.

This PR refactors kosh back into having an separate packages. It reworks the error handling to no longer use the panic/recover system, and it extracts the template and table rendering logic out into hopefully re-usable components as well.

User facing changes should be minimal. Some places where kosh was pulling a lot of information for output have been streamlined (temporarily) until we have better feedback on what information we need from those commands. Also some of the command shortcuts from conch-shell have been restored because finger memory is a thing.