Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fix GenerateFingerprint() and add ParseFingerprint(). #188
Conversation
ericsnowcurrently
added some commits
Jan 8, 2016
natefinch
reviewed
Jan 8, 2016
| func (s *FingerprintSuite) TestGenerateFingerprint(c *gc.C) { | ||
| expected, _ := newFingerprint(c, "spamspamspam") | ||
| + data := bytes.NewBufferString("spamspamspam") |
natefinch
Jan 8, 2016
Contributor
FYI, strings.NewReader is more appropriate here, it's the string->io.Reader that you're looking for.
|
LGTM, though it'll break a bunch of stuff in our code... perhaps we don't actually use this until after the demo? |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-charm |
added a commit
that referenced
this pull request
Jan 8, 2016
jujubot
merged commit d42434b
into
juju:v6-unstable
Jan 8, 2016
ericsnowcurrently
deleted the
ericsnowcurrently:resources-fingerprint-reader
branch
Jan 8, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ericsnowcurrently commentedJan 8, 2016
This patch changes GenerateFingerprint to take a reader rather than bytes. This aligns better with how it will be used.
ParseFingerprint() is added to provide a roundtrip for Fingerprint.String(). This is useful when Fingerprint.String() is used to serialize. Then ParseFingerprint() can be used to deserialize.