Skip to content
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

[WIP] chore: restructure CLI init and begin logging refactor #2350

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

nathan-nicholson
Copy link
Contributor

Description

Very WIP stab at refactoring the foundation of how dependencies such as logging and message printing are handled by commands.

Related Issue(s)

Fixes #

How to test

Signed-off-by: nathan-nicholson <[email protected]>
Signed-off-by: nathan-nicholson <[email protected]>
* add logger interface
* add error logging
* add utility for making k1 directory that returns an error

Signed-off-by: nathan-nicholson <[email protected]>
apiTypes "github.com/konstructio/kubefirst-api/pkg/types"
)

type mockHTTPClient struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not something that needs change but don't forget there's a whole httptest package that adds support for mocking stuff out of the box (including http requests and responses).

See here for reference: https://github.com/konstructio/dropkick/blob/main/internal/civo/sdk/json/json_fetch_test.go

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. This was from the robot and I haven't got back to this yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants