File: doc.go

package info (click to toggle)
golang-github-efficientgo-core 1.0.0~rc3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 580 kB
  • sloc: makefile: 68
file content (29 lines) | stat: -rw-r--r-- 648 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

// Package merrors implements multi error implementation that chains errors on the same level.
// Supports errors.As and errors.Is functions.
//
// Example 1:
//
//	return merrors.New(err1, err2).Err()
//
// Example 2:
//
//	merr := merrors.New(err1)
//	merr.Add(err2, errOrNil3)
//	for _, err := range errs {
//	  merr.Add(err)
//	}
//	return merr.Err()
//
// Example 3:
//
//		func CloseAll(closers []io.Closer) error {
//			errs := merrors.New()
//			for _ , c := range closers {
//				errs.Add(c.Close())
//	   	}
//			return errs.Err()
//		}
package merrors