github.com/aavshr/aws-sdk-go@v1.41.3/awstesting/discard.go (about)

     1  package awstesting
     2  
     3  // DiscardAt is an io.WriteAt that discards
     4  // the requested bytes to be written
     5  type DiscardAt struct{}
     6  
     7  // WriteAt discards the given []byte slice and returns len(p) bytes
     8  // as having been written at the given offset. It will never return an error.
     9  func (d DiscardAt) WriteAt(p []byte, off int64) (n int, err error) {
    10  	return len(p), nil
    11  }