Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Cleanup deliveryState or remove TODO #81

Open
vcabbage opened this issue Apr 11, 2018 · 0 comments
Open

Cleanup deliveryState or remove TODO #81

vcabbage opened this issue Apr 11, 2018 · 0 comments

Comments

@vcabbage
Copy link
Owner

amqp/types.go

Lines 560 to 589 in ee6eb7e

type deliveryState interface{} // TODO: http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transactions-v1.0-os.html#type-declared
type unsettled map[string]deliveryState
func (u unsettled) marshal(wr *buffer) error {
return writeMap(wr, u)
}
func (u *unsettled) unmarshal(r *buffer) error {
count, err := readMapHeader(r)
if err != nil {
return err
}
m := make(unsettled, count/2)
for i := uint32(0); i < count; i += 2 {
key, err := readString(r)
if err != nil {
return err
}
var value deliveryState
err = unmarshal(r, &value)
if err != nil {
return err
}
m[key] = value
}
*u = m
return nil
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant