Skip to content

Instantly share code, notes, and snippets.

View kei2100's full-sized avatar

Kei Arima kei2100

  • Japan
  • 20:15 (UTC +09:00)
View GitHub Profile
@kei2100
kei2100 / closer_test
Created December 8, 2015 13:07
closer test golang
// Try to close the reader if the io.Closer interface is implemented
if closer, ok := src.(io.Closer); ok {
closer.Close()
}