Skip to content

Instantly share code, notes, and snippets.

@kei2100
Created December 8, 2015 13:07
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 kei2100/d7dcf04c177846f90f3e to your computer and use it in GitHub Desktop.
Save kei2100/d7dcf04c177846f90f3e to your computer and use it in GitHub Desktop.
closer test golang
// Try to close the reader if the io.Closer interface is implemented
if closer, ok := src.(io.Closer); ok {
closer.Close()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment