mirror of
https://github.com/therootcompany/golib.git
synced 2026-04-24 12:48:00 +00:00
chore(sql-migrate): remove dead subcmd != "create" checks in status/list cases
Go switch cases don't fall through, so subcmd can never be "create" when we're inside the "status" or "list" case.
This commit is contained in:
parent
da7f45438c
commit
c4964a5b65
@ -320,7 +320,7 @@ func main() {
|
||||
os.Exit(1)
|
||||
}
|
||||
case "status":
|
||||
if len(leafArgs) > 0 && subcmd != "create" {
|
||||
if len(leafArgs) > 0 {
|
||||
fmt.Fprintf(os.Stderr, "Error: unexpected args: %s\n", strings.Join(leafArgs, " "))
|
||||
os.Exit(1)
|
||||
}
|
||||
@ -329,7 +329,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
case "list":
|
||||
if len(leafArgs) > 0 && subcmd != "create" {
|
||||
if len(leafArgs) > 0 {
|
||||
fmt.Fprintf(os.Stderr, "Error: unexpected args: %s\n", strings.Join(leafArgs, " "))
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user