MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / MergeErrors

Function MergeErrors

pkg/utils/slice.go:68–76  ·  view source on GitHub ↗
(errs ...error)

Source from the content-addressed store, hash-verified

66}
67
68func MergeErrors(errs ...error) error {
69 errStr := strings.Join(MustSliceConvert(errs, func(err error) string {
70 return err.Error()
71 }), "\n")
72 if errStr != "" {
73 return errors.New(errStr)
74 }
75 return nil
76}
77
78func SliceMeet[T1, T2 any](arr []T1, v T2, meet func(item T1, v T2) bool) bool {
79 for _, item := range arr {

Callers

nothing calls this directly

Calls 2

MustSliceConvertFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected