-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MakeColor now indicates conversion errors by returning a second value #27
Conversation
MakeColor now returns a bool as its secondary return value, indicating whether the conversion failed because the source color's alpha channel was set to 0. In such cases, the returned color will have R, G and B set to 0, too.
Thanks, very nice PR. I believe quite a few projects depend on Oh and we could keep the Q/A in the README if we reformulate the question as |
Happy to help, of course! The general convention and my recommendation would be following Sticking to semver, you're guaranteeing API compatibility for releases of the same major version:
That in turn means the current codebase should either be releases as I'll amend the README as you suggested. We should probably also mention the breaking API change between the two release there. NB: Really include the |
Thanks! I'm aware of semver but didn't know the tools actually make use of it, good to know. I'd go for What I'm wondering about is how to actually "make a release" in the Go world? I've done so in Py and C++ before, but never Go. Is it only creating a release/tag on Github, or is there other things like some files in the repo? Thanks for your help already and sorry for not searching the info myself, I'm lazy on travel 😄 Good point on mentioning the change in the README. I would add a By the way, feel free to add your name at the end of the README in the Release NotesVersion 1.0
Version 0.9
|
You indeed only need to go to the |
@lucasb-eyer Done and done. As discussed, I haven't included the |
And done, and done, and done 😄 These were some very welcome contributions, and thank you for having the patience of explaining things to me! |
MakeColor now returns a bool as its secondary return value, indicating
whether the conversion failed because the source color's alpha channel
was set to 0. In such cases, the returned color will have R, G and B
set to 0, too.
Note: this will break the API. I'm not sure how many projects depend on
go-colorful
, but it might be a good idea to package the current state as a proper release before merging this.Fixes #21.