@@ -186,7 +186,7 @@ func (f *File) Readdirnames(n int) (names []string, err error) {
186
186
func (f * File ) Read (b []byte ) (n int , err error ) {
187
187
f .fileData .Lock ()
188
188
defer f .fileData .Unlock ()
189
- if f .closed == true {
189
+ if f .closed {
190
190
return 0 , ErrFileClosed
191
191
}
192
192
if len (b ) > 0 && int (f .at ) == len (f .fileData .data ) {
@@ -214,7 +214,7 @@ func (f *File) ReadAt(b []byte, off int64) (n int, err error) {
214
214
}
215
215
216
216
func (f * File ) Truncate (size int64 ) error {
217
- if f .closed == true {
217
+ if f .closed {
218
218
return ErrFileClosed
219
219
}
220
220
if f .readOnly {
@@ -236,7 +236,7 @@ func (f *File) Truncate(size int64) error {
236
236
}
237
237
238
238
func (f * File ) Seek (offset int64 , whence int ) (int64 , error ) {
239
- if f .closed == true {
239
+ if f .closed {
240
240
return 0 , ErrFileClosed
241
241
}
242
242
switch whence {
@@ -251,7 +251,7 @@ func (f *File) Seek(offset int64, whence int) (int64, error) {
251
251
}
252
252
253
253
func (f * File ) Write (b []byte ) (n int , err error ) {
254
- if f .closed == true {
254
+ if f .closed {
255
255
return 0 , ErrFileClosed
256
256
}
257
257
if f .readOnly {
@@ -330,8 +330,8 @@ func (s *FileInfo) Size() int64 {
330
330
331
331
var (
332
332
ErrFileClosed = errors .New ("File is closed" )
333
- ErrOutOfRange = errors .New ("Out of range" )
334
- ErrTooLarge = errors .New ("Too large" )
333
+ ErrOutOfRange = errors .New ("out of range" )
334
+ ErrTooLarge = errors .New ("too large" )
335
335
ErrFileNotFound = os .ErrNotExist
336
336
ErrFileExists = os .ErrExist
337
337
ErrDestinationExists = os .ErrExist
0 commit comments