code: func (r *LogRequest) Validate() error {
  	switch {
  	case r.Project == "":
  		return errors.New("project is required")
  	case r.PageSize < 0:
  		return errors.New("page size must not be negative")
  	case r.Committish == "":
  		return errors.New("committish is required")
  	case strings.Contains(r.Committish, ".."):
  		return errors.New("committish cannot contain \"..\"; use Ancestor instead")
  	default:
  		return nil
  	}
  }
docs: // Validate returns an error if r is invalid.