@@ -83,7 +83,7 @@ func (b *VFS) Close() error {
83
83
func (b * VFS ) First () (version uint , err error ) {
84
84
v , ok := b .migrations .First ()
85
85
if ! ok {
86
- return 0 , & os.PathError {"first" , "<vfs>://" + b .path , os .ErrNotExist }
86
+ return 0 , & os.PathError {Op : "first" , Path : "<vfs>://" + b .path , Err : os .ErrNotExist }
87
87
}
88
88
return v , nil
89
89
}
@@ -93,7 +93,7 @@ func (b *VFS) First() (version uint, err error) {
93
93
func (b * VFS ) Prev (version uint ) (prevVersion uint , err error ) {
94
94
v , ok := b .migrations .Prev (version )
95
95
if ! ok {
96
- return 0 , & os.PathError {fmt .Sprintf ("prev for version %v" , version ), "<vfs>://" + b .path , os .ErrNotExist }
96
+ return 0 , & os.PathError {Op : fmt .Sprintf ("prev for version %v" , version ), Path : "<vfs>://" + b .path , Err : os .ErrNotExist }
97
97
}
98
98
return v , nil
99
99
}
@@ -103,7 +103,7 @@ func (b *VFS) Prev(version uint) (prevVersion uint, err error) {
103
103
func (b * VFS ) Next (version uint ) (nextVersion uint , err error ) {
104
104
v , ok := b .migrations .Next (version )
105
105
if ! ok {
106
- return 0 , & os.PathError {fmt .Sprintf ("next for version %v" , version ), "<vfs>://" + b .path , os .ErrNotExist }
106
+ return 0 , & os.PathError {Op : fmt .Sprintf ("next for version %v" , version ), Path : "<vfs>://" + b .path , Err : os .ErrNotExist }
107
107
}
108
108
return v , nil
109
109
}
@@ -120,7 +120,7 @@ func (b *VFS) ReadUp(version uint) (r io.ReadCloser, identifier string, err erro
120
120
}
121
121
return ioutil .NopCloser (bytes .NewReader (body )), m .Identifier , nil
122
122
}
123
- return nil , "" , & os.PathError {fmt .Sprintf ("read version %v" , version ), "<vfs>://" + b .path , os .ErrNotExist }
123
+ return nil , "" , & os.PathError {Op : fmt .Sprintf ("read version %v" , version ), Path : "<vfs>://" + b .path , Err : os .ErrNotExist }
124
124
}
125
125
126
126
// ReadDown returns the down migration body and an identifier that helps with
@@ -133,5 +133,5 @@ func (b *VFS) ReadDown(version uint) (r io.ReadCloser, identifier string, err er
133
133
}
134
134
return ioutil .NopCloser (bytes .NewReader (body )), m .Identifier , nil
135
135
}
136
- return nil , "" , & os.PathError {fmt .Sprintf ("read version %v" , version ), "<vfs>://" + b .path , os .ErrNotExist }
136
+ return nil , "" , & os.PathError {Op : fmt .Sprintf ("read version %v" , version ), Path : "<vfs>://" + b .path , Err : os .ErrNotExist }
137
137
}
0 commit comments