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
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...