Skip to content

Commit 86d627e

Browse files
authored
Merge pull request #732 from antoninbas/fix-error-messages-for-test-client-in-uds-mode
Fix error messages for test-client in UDS mode
2 parents 8ae445c + 73a8871 commit 86d627e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmd/test-client/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,13 @@ func (o *GrpcProxyClientOptions) Validate() error {
167167
}
168168
if o.proxyUdsName != "" {
169169
if o.proxyHost != "" {
170-
return fmt.Errorf("please do set proxy host when using UDS")
170+
return fmt.Errorf("please set proxy host to \"\" when using UDS")
171171
}
172172
if o.proxyPort != 0 {
173-
return fmt.Errorf("please do set proxy server port to 0 not %d when using UDS", o.proxyPort)
173+
return fmt.Errorf("please set proxy server port to 0 when using UDS")
174174
}
175175
if o.clientKey != "" || o.clientCert != "" || o.caCert != "" {
176-
return fmt.Errorf("please do set cert materials when using UDS, key = %s, cert = %s, CA = %s",
176+
return fmt.Errorf("please do not set cert materials when using UDS, key = %s, cert = %s, CA = %s",
177177
o.clientKey, o.clientCert, o.caCert)
178178
}
179179
}
@@ -231,7 +231,7 @@ type Client struct {
231231
func (c *Client) run(o *GrpcProxyClientOptions) error {
232232
o.Print()
233233
if err := o.Validate(); err != nil {
234-
return fmt.Errorf("failed to validate proxy client options, got %v", err)
234+
return fmt.Errorf("failed to validate proxy client options, got: %w", err)
235235
}
236236

237237
// Run remote simple http service on server side as

0 commit comments

Comments
 (0)