code: func (a errorMsgs) ByType(typ ErrorType) errorMsgs {
  	if len(a) == 0 {
  		return nil
  	}
  	if typ == ErrorTypeAny {
  		return a
  	}
  	var result errorMsgs
  	for _, msg := range a {
  		if msg.IsType(typ) {
  			result = append(result, msg)
  		}
  	}
  	return result
  }
docs: // ByType returns a readonly copy filtered the byte.
  // ie ByType(gin.ErrorTypePublic) returns a slice of errors with type=ErrorTypePublic.