go fix applied the modernizers. One rewrite it got wrong is corrected here: a
reverse loop over runes became a range over slices.Backward that bound the index
and the value to the SAME name, which does not compile and would have compared a
rune to an index if it had. The value gets its own name.
Co-authored-by: Hanzo Dev <[email protected]>
As of Go 1.16, the same functionality is now provided by package io or
package os, and those implementations should be preferred in new code.
So replacing all usage of ioutil pkg with io & os.
* Add io/fs#FS Driver #471
* Refactor iofs.Iofs to be independent of httpfs
* Rename Iofs to IoFS, accepts fs.FS and use fs.DirEntry.Info() to undo the changes in ErrDuplicateMigration
* fix documents and migration directory for testing
* Fix iofs.Driver so that it can be used by embedding it like httpfs.PartialDriver
* iofs.Driver closes the file system if possible
* Rename receiver
* Refactor file driver to use iofs.Driver
* iofs build constraint is not needed so remove it
* Properly return an error in a corner case
* Increase golangci-lint timeout
* Fix example code
* Revert "Increase golangci-lint timeout"
This reverts commit 2cd12a63b50b7ac48d12dd0adc1ec4f4b49c3b93.
* unexport driver, add iofs.PartialDriver, remove type alias from file driver
* do not panic in Open, return error
* Include file path in errors from PartialDriver.ReadUp() and ReadDown()
* Use errors.Is(...) instead of os.Is...() in migrate.go: https://github.com/golang/go/issues/41122