-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract client flags specs to seperate methods
Make sure the main function is not overhelming, extract portion of lines to separate methods for better read. Found that client in `toxic add` supports both: `--upstream` and `--downstream`. Because it tries to create 2 toxic with single name it produces the error when tries add `--downstream` toxic, and in same time creates the `--upstream` toxic. To remove confusion update the client usage help to support only one in same time. Return error message in case 2 flags provided.
- Loading branch information
Showing
4 changed files
with
187 additions
and
126 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package toxiproxy | ||
|
||
type ToxicOptions struct { | ||
ProxyName, | ||
ToxicName, | ||
ToxicType, | ||
Stream string | ||
Toxicity float32 | ||
Attributes Attributes | ||
} |