code: func validateUserEventParams(params *UserEvent) error {
  	// Validate the inputs
  	if params.Name == "" {
  		return fmt.Errorf("User event missing name")
  	}
  	if params.TagFilter != "" && params.ServiceFilter == "" {
  		return fmt.Errorf("Cannot provide tag filter without service filter")
  	}
  	if params.NodeFilter != "" {
  		if _, err := regexp.Compile(params.NodeFilter); err != nil {
  			return fmt.Errorf("Invalid node filter: %v", err)
  		}
  	}
  	if params.ServiceFilter != "" {
  		if _, err := regexp.Compile(params.ServiceFilter); err != nil {
  			return fmt.Errorf("Invalid service filter: %v", err)
  		}
  	}
  	if params.TagFilter != "" {
  		if _, err := regexp.Compile(params.TagFilter); err != nil {
  			return fmt.Errorf("Invalid tag filter: %v", err)
  		}
  	}
  	return nil
  }
docs: // validateUserEventParams is used to sanity check the inputs