github.com/creativeprojects/go-selfupdate@v1.2.0/bogusreader_test.go (about) 1 package selfupdate 2 3 import ( 4 "errors" 5 "io" 6 ) 7 8 type bogusReader struct{} 9 10 func (r *bogusReader) Read(p []byte) (n int, err error) { 11 return 0, errors.New("cannot read") 12 } 13 14 // Verify interface 15 var _ io.Reader = &bogusReader{}