Skip to content

Instantly share code, notes, and snippets.

@jimtla
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimtla/fa9095d85ee1ba54c431 to your computer and use it in GitHub Desktop.
Save jimtla/fa9095d85ee1ba54c431 to your computer and use it in GitHub Desktop.
Code Sample for Go Leaks blog post
func resizeAndWrite(img image.Image, width int, path string, c chan error) {
newImg := resize.Resize(uint(width), 0, img, resize.Bicubic)
err := writeJpegToS3(s, newImg, path)
// Write back to the channel with the status of the S3 write operation.
c <- err
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment