Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6fa8039

Browse files
author
Ryo Takashima
committed
Fixed unkeyed fields for GoogleAppEngine
1 parent faf4307 commit 6fa8039

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/file/file.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,23 @@ func (f *File) Close() error {
8282

8383
func (f *File) First() (version uint, err error) {
8484
if v, ok := f.migrations.First(); !ok {
85-
return 0, &os.PathError{"first", f.path, os.ErrNotExist}
85+
return 0, &os.PathError{Op: "first", Path: f.path, Err: os.ErrNotExist}
8686
} else {
8787
return v, nil
8888
}
8989
}
9090

9191
func (f *File) Prev(version uint) (prevVersion uint, err error) {
9292
if v, ok := f.migrations.Prev(version); !ok {
93-
return 0, &os.PathError{fmt.Sprintf("prev for version %v", version), f.path, os.ErrNotExist}
93+
return 0, &os.PathError{Op: fmt.Sprintf("prev for version %v", version), Path: f.path, Err: os.ErrNotExist}
9494
} else {
9595
return v, nil
9696
}
9797
}
9898

9999
func (f *File) Next(version uint) (nextVersion uint, err error) {
100100
if v, ok := f.migrations.Next(version); !ok {
101-
return 0, &os.PathError{fmt.Sprintf("next for version %v", version), f.path, os.ErrNotExist}
101+
return 0, &os.PathError{Op: fmt.Sprintf("next for version %v", version), Path: f.path, Err: os.ErrNotExist}
102102
} else {
103103
return v, nil
104104
}
@@ -112,7 +112,7 @@ func (f *File) ReadUp(version uint) (r io.ReadCloser, identifier string, err err
112112
}
113113
return r, m.Identifier, nil
114114
}
115-
return nil, "", &os.PathError{fmt.Sprintf("read version %v", version), f.path, os.ErrNotExist}
115+
return nil, "", &os.PathError{Op: fmt.Sprintf("read version %v", version), Path: f.path, Err: os.ErrNotExist}
116116
}
117117

118118
func (f *File) ReadDown(version uint) (r io.ReadCloser, identifier string, err error) {
@@ -123,5 +123,5 @@ func (f *File) ReadDown(version uint) (r io.ReadCloser, identifier string, err e
123123
}
124124
return r, m.Identifier, nil
125125
}
126-
return nil, "", &os.PathError{fmt.Sprintf("read version %v", version), f.path, os.ErrNotExist}
126+
return nil, "", &os.PathError{Op: fmt.Sprintf("read version %v", version), Path: f.path, Err: os.ErrNotExist}
127127
}

0 commit comments

Comments
 (0)