Change error message and comment

Signed-off-by: spike <hello@spike.wiki>
This commit is contained in:
spike 2022-11-13 15:32:12 +08:00
parent 1d9f3358e4
commit 6937857bf8
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ func createMetadata(pubSubMetadata pubsub.Metadata, log logger.Logger) (*metadat
if result.connectionString != "" {
uri, err := amqp.ParseURI(result.connectionString)
if err != nil {
return &result, err
return &result, fmt.Errorf("%s invalid connection string: %s, err: %w", errorMessagePrefix, result.connectionString, err)
}
result.protocol = uri.Scheme
}

View File

@ -20,7 +20,7 @@ const (
ClientKey = "clientKey"
)
// TLS takes a metadata object and returns the TlsCfg configured.
// TLS takes a metadata object and returns the TLSProperties configured.
func TLS(metadata map[string]string) (TLSProperties, error) {
cfg := TLSProperties{}