mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-24 08:46:24 -07:00
parse command line flags in gochan-migration before loading config
This commit is contained in:
parent
d4f1ce4d45
commit
29f54a6064
1 changed files with 3 additions and 4 deletions
|
@ -36,14 +36,13 @@ func main() {
|
|||
var dirAction string
|
||||
|
||||
log.SetFlags(0)
|
||||
config.InitConfig(versionStr)
|
||||
flag.StringVar(&options.ChanType, "oldchan", "", "The imageboard we are migrating from (currently only pre2021 is supported, but more are coming")
|
||||
flag.StringVar(&options.OldChanConfig, "oldconfig", "", "The path to the old chan's configuration file")
|
||||
/* flag.StringVar(&dirAction, "diraction", "",
|
||||
"Action taken on each board directory after it has been migrated. "+allowedDirActions) */
|
||||
|
||||
// flag.StringVar(&dirAction, "diraction", "", "Action taken on each board directory after it has been migrated. "+allowedDirActions)
|
||||
flag.Parse()
|
||||
|
||||
config.InitConfig(versionStr)
|
||||
|
||||
if options.ChanType == "" || options.OldChanConfig == "" {
|
||||
flag.PrintDefaults()
|
||||
log.Fatal("Missing required oldchan value")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue