Skip to content

Consistently use *Version in exported API (fixes #20)#21

Open
alexanderwilling wants to merge 2 commits into
coreos:mainfrom
alexanderwilling:master
Open

Consistently use *Version in exported API (fixes #20)#21
alexanderwilling wants to merge 2 commits into
coreos:mainfrom
alexanderwilling:master

Conversation

@alexanderwilling

Copy link
Copy Markdown

This pull request defines all exported methods on the Version type as taking a pointer receiver. Also, all exported methods that accept a version parameter now accept a *Version, which is what New() and NewVersion() already returned.

(As a side effect this addresses the weirdness that previously, Version implemented the json.Marshaler interface, while *Version implemented the json.Unmarshaler interface.)

@alexanderwilling

Copy link
Copy Markdown
Author

If you want I can squash the fix commit and force-push, but I think it's easier to squash-merge in case this PR is accepted.

@alexanderwilling alexanderwilling changed the title Consistently use *Version in exported API (fixes #20) Consistently use *Version in exported API (fixes https://github.com/coreos/go-semver/issue/20) Jan 6, 2017
@alexanderwilling alexanderwilling changed the title Consistently use *Version in exported API (fixes https://github.com/coreos/go-semver/issue/20) Consistently use *Version in exported API (fixes #20) Jan 6, 2017
@euskadi31

Copy link
Copy Markdown

Any updates about this PR ?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants