mirror of
https://github.com/pressly/goose.git
synced 2025-05-31 11:42:04 +00:00
Handling case here walkerr is raised and info is nil
This commit is contained in:
parent
e885648f5a
commit
80dc0ba7ad
@ -5,8 +5,8 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
_ "github.com/lib/pq"
|
||||
_ "github.com/ziutek/mymysql/godrv"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
_ "github.com/ziutek/mymysql/godrv"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -318,6 +318,9 @@ func GetMostRecentDBVersion(dirpath string) (version int64, err error) {
|
||||
version = -1
|
||||
|
||||
filepath.Walk(dirpath, func(name string, info os.FileInfo, walkerr error) error {
|
||||
if walkerr != nil {
|
||||
return walkerr
|
||||
}
|
||||
|
||||
if !info.IsDir() {
|
||||
if v, e := NumericComponent(name); e == nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user