adding ref mat'l, Service tests done

This commit is contained in:
2021-12-10 02:50:30 -05:00
parent eda1777431
commit 94ae20829e
7 changed files with 348 additions and 73 deletions

View File

@@ -8,7 +8,7 @@ import (
NewErrors returns a new MultiError based on a slice of error.Error (errs).
Any nil errors are trimmed. If there are no actual errors after trimming, err will be nil.
*/
func NewErrors(errs ...error) (err *MultiError) {
func NewErrors(errs ...error) (err error) {
if errs == nil || len(errs) == 0 {
return
@@ -46,7 +46,7 @@ func (e *MultiError) Error() (errStr string) {
}
for idx, err := range e.Errors {
if (idx +1 ) < numErrs {
if (idx + 1) < numErrs {
errStr += fmt.Sprintf(err.Error(), e.ErrorSep)
} else {
errStr += err.Error()