migrate: support start desired version

This commit is contained in:
Yicheng Qin
2015-01-22 13:40:45 -08:00
parent 43f1ccc88c
commit ec5a6e8beb
9 changed files with 1034 additions and 5 deletions

View File

@@ -119,3 +119,13 @@ func URLsFromFlags(fs *flag.FlagSet, urlsFlagName string, addrFlagName string, t
return []url.URL(*fs.Lookup(urlsFlagName).Value.(*URLsValue)), nil
}
func IsSet(fs *flag.FlagSet, name string) bool {
set := false
fs.Visit(func(f *flag.Flag) {
if f.Name == name {
set = true
}
})
return set
}