Copy in interfaces rather than using encoding module import #4

Merged
merged 2 commits into from Apr 13, 2015

Conversation

Projects
None yet
2 participants
Contributor

bz2 commented Apr 13, 2015

Workaround odd gccgo issue, which fails with errors along the lines of:

../xml/marshal.go:10:2: cannot find package "encoding" in any of:
/usr/src/pkg/encoding (from $GOROOT)

As this forked code only imports encoding for the TextMarshaler and TextUnmarshaler interface, just bring those in where they're used and drop the import.

marshal.go
+// marshal itself into a textual form.
+//
+// MarshalText encodes the receiver into UTF-8-encoded text and returns the result.
+type TextMarshaler interface {
@rogpeppe

rogpeppe Apr 13, 2015

Owner

let's not export this.

read.go
+// UnmarshalText must be able to decode the form generated by MarshalText.
+// UnmarshalText must copy the text if it wishes to retain the text
+// after returning.
+type TextUnmarshaler interface {
Owner

rogpeppe commented Apr 13, 2015

LGTM with two trivial changes, thanks!

Contributor

bz2 commented Apr 13, 2015

Have done the lowercasing as suggested.

bz2 pushed a commit that referenced this pull request Apr 13, 2015

Merge pull request #4 from bz2/no_encoding_import
Copy in interfaces rather than using encoding module import

@bz2 bz2 merged commit eb759a6 into juju:master Apr 13, 2015

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