diff --git a/doc/generated.usage.txt b/doc/generated.usage.txt index ba4c42f..565862f 100644 --- a/doc/generated.usage.txt +++ b/doc/generated.usage.txt @@ -33,8 +33,8 @@ Flags: --protoc Forces the use of a global protoc executable found in PATH or via --protoc-path instead of using the bundled one. If none was found, then exits with an error. --protoc-path string Uses the given path to invoke protoc instead of searching for protoc in PATH. Also activates --protoc. -H, --request-header string Adds the string header to the invocation of cURL. This option is not supported when --no-curl is active. E.g. -H 'MyHeader: FooBar'. - -i, --request-type string Mandatory: Package path of the Protobuf request type. E.g. mypackage.MyRequest - -o, --response-type string Mandatory: Package path of the Protobuf response type. E.g. mypackage.MyResponse + -i, --request-type string Mandatory: Message name or full package path of the Protobuf request type. The path can be shortened to '..', if the name of the request message is unique. E.g. mypackage.MyRequest or ..MyRequest + -o, --response-type string Mandatory: The Protobuf response type. See -i -q, --show-output-only Suppresses all output except response Protobuf as text. Overrides and deactivates -v and -D. Errors are still printed to stderr. -u, --url string Mandatory: The url to send the request to -v, --verbose Prints version and enables verbose output. Also activates -D. diff --git a/src/flags.go b/src/flags.go index 4c896a3..9d8388c 100644 --- a/src/flags.go +++ b/src/flags.go @@ -56,11 +56,11 @@ func intialiseFlags() { "Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred.") flags.StringVarP(&CurrentConfig.RequestType, "request-type", "i", "", - "Mandatory: Package path of the Protobuf request type. E.g. mypackage.MyRequest") + "Mandatory: Message name or full package path of the Protobuf request type. The path can be shortened to '..', if the name of the request message is unique. E.g. mypackage.MyRequest or ..MyRequest") AssertSuccess(rootCmd.MarkFlagRequired("request-type")) flags.StringVarP(&CurrentConfig.ResponseType, "response-type", "o", "", - "Mandatory: Package path of the Protobuf response type. E.g. mypackage.MyResponse") + "Mandatory: The Protobuf response type. See -i ") AssertSuccess(rootCmd.MarkFlagRequired("response-type")) flags.StringVar(&tmpInTextType, "in", "", diff --git a/test/results/help-expected.txt b/test/results/help-expected.txt index 92a4e99..3f4bb94 100644 --- a/test/results/help-expected.txt +++ b/test/results/help-expected.txt @@ -34,8 +34,8 @@ Flags: --protoc Forces the use of a global protoc executable found in PATH or via --protoc-path instead of using the bundled one. If none was found, then exits with an error. --protoc-path string Uses the given path to invoke protoc instead of searching for protoc in PATH. Also activates --protoc. -H, --request-header string Adds the string header to the invocation of cURL. This option is not supported when --no-curl is active. E.g. -H 'MyHeader: FooBar'. - -i, --request-type string Mandatory: Package path of the Protobuf request type. E.g. mypackage.MyRequest - -o, --response-type string Mandatory: Package path of the Protobuf response type. E.g. mypackage.MyResponse + -i, --request-type string Mandatory: Message name or full package path of the Protobuf request type. The path can be shortened to '..', if the name of the request message is unique. E.g. mypackage.MyRequest or ..MyRequest + -o, --response-type string Mandatory: The Protobuf response type. See -i -q, --show-output-only Suppresses all output except response Protobuf as text. Overrides and deactivates -v and -D. Errors are still printed to stderr. -u, --url string Mandatory: The url to send the request to -v, --verbose Prints version and enables verbose output. Also activates -D. diff --git a/test/results/help-missing-curl-expected.txt b/test/results/help-missing-curl-expected.txt index 92a4e99..3f4bb94 100644 --- a/test/results/help-missing-curl-expected.txt +++ b/test/results/help-missing-curl-expected.txt @@ -34,8 +34,8 @@ Flags: --protoc Forces the use of a global protoc executable found in PATH or via --protoc-path instead of using the bundled one. If none was found, then exits with an error. --protoc-path string Uses the given path to invoke protoc instead of searching for protoc in PATH. Also activates --protoc. -H, --request-header string Adds the string header to the invocation of cURL. This option is not supported when --no-curl is active. E.g. -H 'MyHeader: FooBar'. - -i, --request-type string Mandatory: Package path of the Protobuf request type. E.g. mypackage.MyRequest - -o, --response-type string Mandatory: Package path of the Protobuf response type. E.g. mypackage.MyResponse + -i, --request-type string Mandatory: Message name or full package path of the Protobuf request type. The path can be shortened to '..', if the name of the request message is unique. E.g. mypackage.MyRequest or ..MyRequest + -o, --response-type string Mandatory: The Protobuf response type. See -i -q, --show-output-only Suppresses all output except response Protobuf as text. Overrides and deactivates -v and -D. Errors are still printed to stderr. -u, --url string Mandatory: The url to send the request to -v, --verbose Prints version and enables verbose output. Also activates -D. diff --git a/test/results/help-missing-curl-no-curl-expected.txt b/test/results/help-missing-curl-no-curl-expected.txt index 92a4e99..3f4bb94 100644 --- a/test/results/help-missing-curl-no-curl-expected.txt +++ b/test/results/help-missing-curl-no-curl-expected.txt @@ -34,8 +34,8 @@ Flags: --protoc Forces the use of a global protoc executable found in PATH or via --protoc-path instead of using the bundled one. If none was found, then exits with an error. --protoc-path string Uses the given path to invoke protoc instead of searching for protoc in PATH. Also activates --protoc. -H, --request-header string Adds the string header to the invocation of cURL. This option is not supported when --no-curl is active. E.g. -H 'MyHeader: FooBar'. - -i, --request-type string Mandatory: Package path of the Protobuf request type. E.g. mypackage.MyRequest - -o, --response-type string Mandatory: Package path of the Protobuf response type. E.g. mypackage.MyResponse + -i, --request-type string Mandatory: Message name or full package path of the Protobuf request type. The path can be shortened to '..', if the name of the request message is unique. E.g. mypackage.MyRequest or ..MyRequest + -o, --response-type string Mandatory: The Protobuf response type. See -i -q, --show-output-only Suppresses all output except response Protobuf as text. Overrides and deactivates -v and -D. Errors are still printed to stderr. -u, --url string Mandatory: The url to send the request to -v, --verbose Prints version and enables verbose output. Also activates -D. diff --git a/test/results/help-no-curl-expected.txt b/test/results/help-no-curl-expected.txt index 92a4e99..3f4bb94 100644 --- a/test/results/help-no-curl-expected.txt +++ b/test/results/help-no-curl-expected.txt @@ -34,8 +34,8 @@ Flags: --protoc Forces the use of a global protoc executable found in PATH or via --protoc-path instead of using the bundled one. If none was found, then exits with an error. --protoc-path string Uses the given path to invoke protoc instead of searching for protoc in PATH. Also activates --protoc. -H, --request-header string Adds the string header to the invocation of cURL. This option is not supported when --no-curl is active. E.g. -H 'MyHeader: FooBar'. - -i, --request-type string Mandatory: Package path of the Protobuf request type. E.g. mypackage.MyRequest - -o, --response-type string Mandatory: Package path of the Protobuf response type. E.g. mypackage.MyResponse + -i, --request-type string Mandatory: Message name or full package path of the Protobuf request type. The path can be shortened to '..', if the name of the request message is unique. E.g. mypackage.MyRequest or ..MyRequest + -o, --response-type string Mandatory: The Protobuf response type. See -i -q, --show-output-only Suppresses all output except response Protobuf as text. Overrides and deactivates -v and -D. Errors are still printed to stderr. -u, --url string Mandatory: The url to send the request to -v, --verbose Prints version and enables verbose output. Also activates -D. diff --git a/test/results/missing-args-expected.txt b/test/results/missing-args-expected.txt index f63f7e5..348c090 100644 --- a/test/results/missing-args-expected.txt +++ b/test/results/missing-args-expected.txt @@ -32,8 +32,8 @@ Flags: --protoc Forces the use of a global protoc executable found in PATH or via --protoc-path instead of using the bundled one. If none was found, then exits with an error. --protoc-path string Uses the given path to invoke protoc instead of searching for protoc in PATH. Also activates --protoc. -H, --request-header string Adds the string header to the invocation of cURL. This option is not supported when --no-curl is active. E.g. -H 'MyHeader: FooBar'. - -i, --request-type string Mandatory: Package path of the Protobuf request type. E.g. mypackage.MyRequest - -o, --response-type string Mandatory: Package path of the Protobuf response type. E.g. mypackage.MyResponse + -i, --request-type string Mandatory: Message name or full package path of the Protobuf request type. The path can be shortened to '..', if the name of the request message is unique. E.g. mypackage.MyRequest or ..MyRequest + -o, --response-type string Mandatory: The Protobuf response type. See -i -q, --show-output-only Suppresses all output except response Protobuf as text. Overrides and deactivates -v and -D. Errors are still printed to stderr. -u, --url string Mandatory: The url to send the request to -v, --verbose Prints version and enables verbose output. Also activates -D. diff --git a/test/results/missing-args-no-curl-expected.txt b/test/results/missing-args-no-curl-expected.txt index f63f7e5..348c090 100644 --- a/test/results/missing-args-no-curl-expected.txt +++ b/test/results/missing-args-no-curl-expected.txt @@ -32,8 +32,8 @@ Flags: --protoc Forces the use of a global protoc executable found in PATH or via --protoc-path instead of using the bundled one. If none was found, then exits with an error. --protoc-path string Uses the given path to invoke protoc instead of searching for protoc in PATH. Also activates --protoc. -H, --request-header string Adds the string header to the invocation of cURL. This option is not supported when --no-curl is active. E.g. -H 'MyHeader: FooBar'. - -i, --request-type string Mandatory: Package path of the Protobuf request type. E.g. mypackage.MyRequest - -o, --response-type string Mandatory: Package path of the Protobuf response type. E.g. mypackage.MyResponse + -i, --request-type string Mandatory: Message name or full package path of the Protobuf request type. The path can be shortened to '..', if the name of the request message is unique. E.g. mypackage.MyRequest or ..MyRequest + -o, --response-type string Mandatory: The Protobuf response type. See -i -q, --show-output-only Suppresses all output except response Protobuf as text. Overrides and deactivates -v and -D. Errors are still printed to stderr. -u, --url string Mandatory: The url to send the request to -v, --verbose Prints version and enables verbose output. Also activates -D. diff --git a/test/results/missing-args-partial-expected.txt b/test/results/missing-args-partial-expected.txt index e806f38..973af63 100644 --- a/test/results/missing-args-partial-expected.txt +++ b/test/results/missing-args-partial-expected.txt @@ -32,8 +32,8 @@ Flags: --protoc Forces the use of a global protoc executable found in PATH or via --protoc-path instead of using the bundled one. If none was found, then exits with an error. --protoc-path string Uses the given path to invoke protoc instead of searching for protoc in PATH. Also activates --protoc. -H, --request-header string Adds the string header to the invocation of cURL. This option is not supported when --no-curl is active. E.g. -H 'MyHeader: FooBar'. - -i, --request-type string Mandatory: Package path of the Protobuf request type. E.g. mypackage.MyRequest - -o, --response-type string Mandatory: Package path of the Protobuf response type. E.g. mypackage.MyResponse + -i, --request-type string Mandatory: Message name or full package path of the Protobuf request type. The path can be shortened to '..', if the name of the request message is unique. E.g. mypackage.MyRequest or ..MyRequest + -o, --response-type string Mandatory: The Protobuf response type. See -i -q, --show-output-only Suppresses all output except response Protobuf as text. Overrides and deactivates -v and -D. Errors are still printed to stderr. -u, --url string Mandatory: The url to send the request to -v, --verbose Prints version and enables verbose output. Also activates -D. diff --git a/test/results/missing-args-partial-no-curl-expected.txt b/test/results/missing-args-partial-no-curl-expected.txt index e806f38..973af63 100644 --- a/test/results/missing-args-partial-no-curl-expected.txt +++ b/test/results/missing-args-partial-no-curl-expected.txt @@ -32,8 +32,8 @@ Flags: --protoc Forces the use of a global protoc executable found in PATH or via --protoc-path instead of using the bundled one. If none was found, then exits with an error. --protoc-path string Uses the given path to invoke protoc instead of searching for protoc in PATH. Also activates --protoc. -H, --request-header string Adds the string header to the invocation of cURL. This option is not supported when --no-curl is active. E.g. -H 'MyHeader: FooBar'. - -i, --request-type string Mandatory: Package path of the Protobuf request type. E.g. mypackage.MyRequest - -o, --response-type string Mandatory: Package path of the Protobuf response type. E.g. mypackage.MyResponse + -i, --request-type string Mandatory: Message name or full package path of the Protobuf request type. The path can be shortened to '..', if the name of the request message is unique. E.g. mypackage.MyRequest or ..MyRequest + -o, --response-type string Mandatory: The Protobuf response type. See -i -q, --show-output-only Suppresses all output except response Protobuf as text. Overrides and deactivates -v and -D. Errors are still printed to stderr. -u, --url string Mandatory: The url to send the request to -v, --verbose Prints version and enables verbose output. Also activates -D.