code: func RegisterMode(mode string, makeCmd func(Flags *flag.FlagSet) CommandRunner) {
  	if _, dup := modeCommand[mode]; dup {
  		log.Fatalf("duplicate command %q registered", mode)
  	}
  	flags := flag.NewFlagSet(mode+" options", flag.ContinueOnError)
  	flags.Usage = func() {}
  
  	var cmdHelp bool
  	flags.BoolVar(&cmdHelp, "help", false, "Help for this mode.")
  	wantHelp[mode] = &cmdHelp
  	modeFlags[mode] = flags
  	modeCommand[mode] = makeCmd(flags)
  }
docs: // RegisterMode adds a mode to the list of modes for the main command.
  // It is meant to be called in init() for each subcommand.