Skip to content

Commit

Permalink
Merge pull request #280 from korolev-d-l/fixing-simple-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin authored Aug 21, 2024
2 parents ddb7a2f + a7370c8 commit dc67c21
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ func ExampleTable_SetClientConnectionName() {
// name will be visible in RabbitMQ Management UI.
config := amqp.Config{Properties: amqp.NewConnectionProperties()}
config.Properties.SetClientConnectionName("my-client-app")
conn, err := amqp.Dial("amqp://guest:guest@localhost:5672/")
conn, err := amqp.DialConfig("amqp://guest:guest@localhost:5672/", config)
if err != nil {
log.Fatalf("connection.open: %s", err)
}
Expand Down
2 changes: 1 addition & 1 deletion uri.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func ParseURI(uri string) (URI, error) {
if params.Has("channel_max") {
value, err := strconv.ParseUint(params.Get("channel_max"), 10, 16)
if err != nil {
return builder, fmt.Errorf("connection_timeout is not an integer: %v", err)
return builder, fmt.Errorf("channel_max is not an uint16: %v", err)
}
builder.ChannelMax = uint16(value)
}
Expand Down
2 changes: 1 addition & 1 deletion write.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (f *headerFrame) write(w io.Writer) (err error) {
if f.Properties.ContentEncoding != "" {
mask |= flagContentEncoding
}
if f.Properties.Headers != nil && len(f.Properties.Headers) > 0 {
if len(f.Properties.Headers) > 0 {
mask |= flagHeaders
}
if f.Properties.DeliveryMode > 0 {
Expand Down

0 comments on commit dc67c21

Please sign in to comment.