-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update GetImageBlob/GetImagesBlob to return error as second element (#…
…321) Update GetImageBlob/GetImagesBlob to return error as second element
- Loading branch information
Showing
3 changed files
with
66 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
fb2c7f3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AH!... I was going to file an issue about this 😃
Good, good. I was just surprised why some rock-solid code that has been used for 4 years or so suddenly failed to compile... my language server (well,
gopls
) still believes thatGetImageBlob()
just returns one parameter and gives an error. But the Go compiler is not fooled as easily, and correctly accepts the 2-return-parametersGetImageBlob()
.While I was frustrated after hours of trying to understand what was going on — even going as far as upgrading a live, production Ubuntu server (!) just to compile ImageMagick 7 from scratch again (!!) — at the end of the day, you're right, you should return an error, just for the sake of consistency with the rest of the functions...