-
Notifications
You must be signed in to change notification settings - Fork 103
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
fix: use ctx.Codec when marshaling for generated batch json in CLI #514
Changes from all commits
d26dde0
677b3ea
c6e4b11
6aeff21
c0f40a3
a82d77a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ var reLocation = regexp.MustCompile(`^([A-Z]{2})(?:-([A-Z0-9]{1,3})(?: ([a-zA-Z0 | |
func validateLocation(location string) error { | ||
matches := reLocation.FindStringSubmatch(location) | ||
if matches == nil { | ||
return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "Invalid retirement location: %s.\nLocation should have format <country-code>[-<region-code>[ <postal-code>]].\n", location) | ||
return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "Invalid location: %s.\nLocation should have format <country-code>[-<region-code>[ <postal-code>]].\n", location) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This error gets thrown sometimes for an invalid project_location, so I updated this to make it generic to project and/or retirement location. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like a few test cases need to be updated for this |
||
} | ||
|
||
return nil | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the
Long
help text argument doesn't have access to the*cobra.Command
, so its not possible to retrieve the sdkcontext and the JSON marshaler... So I hardcoded an example JSON help text here.