Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

29 noid #37

Merged
merged 6 commits into from
Dec 31, 2014
Merged

29 noid #37

merged 6 commits into from
Dec 31, 2014

Conversation

nstott
Copy link
Contributor

@nstott nstott commented Dec 31, 2014

This is a pretty core change, it changes the Msg.Document which was a bson.M to Msg.Data which is an interface{}
it removes a lot of the magic surrounding document ids that used to be in Msg
This is a breaking change for things using transporter as a go library

func (m *Msg) IDString(key string) string {
doc, ok := m.Data.(map[string]interface{})
if !ok {
return ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this not be an error? if I'm requesting the ID and get back nothing, then that's bad but I guess it's best to leave that up to whatever is requesting the ID and let it handle there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, probably less magical that way

@jipperinbham
Copy link
Contributor

👍

nstott added a commit that referenced this pull request Dec 31, 2014
@nstott nstott merged commit 6f96aa6 into master Dec 31, 2014
@nstott nstott deleted the 29-noid branch December 31, 2014 20:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants