-
Notifications
You must be signed in to change notification settings - Fork 7
refactor: configure output centrally, allow testing output #348
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
b1a4a69
refactor: configure output centrally to allow testing output
thde 069145f
refactor: align resource kind
thde 24c77ea
docs: add package comments
thde 21f7dd7
feat(create): add interactive wait timer and show elapsed time
thde 67d2eeb
refactor: improve newline output
thde 97cbd18
refactor: ensure Writer is not used as CLI flag
thde 283eccd
refactor: use consistent naming
thde 57cfd9e
refactor: reuse printAvailableOrgsString
thde f347c48
refactor: re-add message
thde f916dc7
refactor(api): remove format dependency
thde 0891083
refactor: make reader configurable
thde c5fd5e4
test(format): add unit tests
thde fb3d467
test(update): add output tests
thde 75a25bf
test(delete): add output tests
thde aa1daf4
refactor: use dedicated methods
thde e47727f
refactor: add info dedicated method
thde 8f83c7b
docs: note to prefer dedicated methods
thde 28f81a2
refactor: align variable name
thde 4692717
refactor: update comment
thde File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // Package api provides the Kubernetes client and configuration for the nine.ch API. | ||
| package api | ||
|
|
||
| import ( | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // Package config provides the nctl specific configuration stored in the kubeconfig. | ||
| package config | ||
|
|
||
| import ( | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // Package log provides functionality to interact with the Nine logging API. | ||
| package log | ||
|
|
||
| import ( | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // Package util provides utility functions for interacting with various Nine resources. | ||
| package util | ||
|
|
||
| import ( | ||
|
|
||
File renamed without changes.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,15 @@ | ||
| // Package apply provides the implementation for the apply command, | ||
| // allowing users to apply resources from files. | ||
| package apply | ||
|
|
||
| import "os" | ||
| import ( | ||
| "os" | ||
|
|
||
| "github.com/ninech/nctl/internal/format" | ||
| ) | ||
|
|
||
| type Cmd struct { | ||
| Filename *os.File `short:"f" completion-predictor:"file"` | ||
| FromFile fromFile `cmd:"" default:"1" name:"-f <file>" help:"Apply any resource from a yaml or json file."` | ||
| format.Writer `hidden:""` | ||
| Filename *os.File `short:"f" completion-predictor:"file"` | ||
| FromFile fromFile `cmd:"" default:"1" name:"-f <file>" help:"Apply any resource from a yaml or json file."` | ||
| } | ||
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.