...

Source file src/github.com/aws/aws-sdk-go-v2/internal/awstesting/discard.go

Documentation: github.com/aws/aws-sdk-go-v2/internal/awstesting

     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  }
    12  

View as plain text