Skip to content
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

Fixing simple errors #280

Merged
merged 3 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading