code: func (cmd *connectCmd) validateFlags(c context.Context) error {
  	switch {
  	case cmd.dir == "":
  		return errors.New("-dir is required")
  	// TODO(crbug/945063): Remove -server.
  	case cmd.provider == "" && cmd.server == "":
  		return errors.New("-provider or -server is required")
  	case cmd.user == "":
  		return errors.New("-user is required")
  	}
  	return nil
  }
docs: // validateFlags validates parsed command line flags.