mirror of https://github.com/spf13/afero.git
fix: typos
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
parent
5c4385aa20
commit
8859ccdeb6
|
@ -109,7 +109,7 @@ func (o *GcsFile) Seek(newOffset int64, whence int) (int64, error) {
|
||||||
if (whence == 0 && newOffset == o.fhOffset) || (whence == 1 && newOffset == 0) {
|
if (whence == 0 && newOffset == o.fhOffset) || (whence == 1 && newOffset == 0) {
|
||||||
return o.fhOffset, nil
|
return o.fhOffset, nil
|
||||||
}
|
}
|
||||||
log.Printf("WARNING: Seek behavior triggered, highly inefficent. Offset before seek is at %d\n", o.fhOffset)
|
log.Printf("WARNING: Seek behavior triggered, highly inefficient. Offset before seek is at %d\n", o.fhOffset)
|
||||||
|
|
||||||
// Fore the reader/writers to be reopened (at correct offset)
|
// Fore the reader/writers to be reopened (at correct offset)
|
||||||
err := o.Sync()
|
err := o.Sync()
|
||||||
|
|
|
@ -97,7 +97,7 @@ func (o *gcsFileResource) maybeCloseWriter() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf(
|
return fmt.Errorf(
|
||||||
"couldn't simulate a partial write; the closing (and thus"+
|
"couldn't simulate a partial write; the closing (and thus"+
|
||||||
" the whole file write) is NOT commited to GCS. %v", err)
|
" the whole file write) is NOT committed to GCS. %v", err)
|
||||||
}
|
}
|
||||||
if currentFile != nil && currentFile.Remain() > 0 {
|
if currentFile != nil && currentFile.Remain() > 0 {
|
||||||
if _, err := io.Copy(o.writer, currentFile); err != nil {
|
if _, err := io.Copy(o.writer, currentFile); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue