1
0
Fork 0
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:
Eggbertx 2023-03-29 09:35:46 -07:00
parent d4f1ce4d45
commit 29f54a6064

View file

@ -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")