add BundleData.UnmarshaledWithServices method #212

Merged
merged 1 commit into from Jun 9, 2016

Conversation

Projects
None yet
4 participants
Owner

rogpeppe commented Jun 9, 2016

This allows code to know when a bundle has been
unmarshaled from the old format.

Also test marshaling/unmarshaling more fully for
all supported codecs, and remove the obsolete
Meta.Version and Meta.Format fields that have been
deprecated for a long time. We still accept those
fields for backward compatibility but they're ignored.

Member

mhilton commented Jun 9, 2016

👍

url.go
@@ -373,6 +373,26 @@ func (u *URL) UnmarshalJSON(b []byte) error {
return nil
}
+// MarshalTest implements encoding.TextMarshaler by
@natefinch

natefinch Jun 9, 2016

Contributor

s/MarshalTest/MarshalText

url.go
+ return []byte(u.String()), nil
+}
+
+// Unmarshal implements encoding.TestUnmarshaler by
@natefinch

natefinch Jun 9, 2016

Contributor

s/Unmarshal/UnmarshalText

Contributor

natefinch commented Jun 9, 2016

LGTM other than those two minor things

add BundleData.UnmarshaledWithServices method
This allows code to know when a bundle has been
unmarshaled from the old format.

Also test marshaling/unmarshaling more fully for
all supported codecs, and remove the obsolete
Meta.Version and Meta.Format fields that have been
deprecated for a long time. We still accept those
fields for backward compatibility but they're ignored.
Owner

rogpeppe commented Jun 9, 2016

$$merge$$
:shipit:

Contributor

jujubot commented Jun 9, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-charm

@jujubot jujubot merged commit 8796be6 into juju:v6-unstable Jun 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment