Debian Codegraph @

tools/channels.go

raw symbols SCIP
1 package toolsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/
2
3 import "github.com/git-lfs/git-lfs/v3/errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/"
4
5 // Interface for all types of wrapper around a channel of results and an error channel
6 // Implementors will expose a type-specific channel for results
7 // Call the Wait() function after processing the results channel to catch any errors
8 // that occurred during the async processing
9 type ChannelWrapperscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/ChannelWrapper# interface {
10 // Call this after processing results channel to check for async errors
11 Waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/ChannelWrapper#Wait.() error
12 }
13
14 // Base implementation of channel wrapper to just deal with errors
15 type BaseChannelWrapperscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/BaseChannelWrapper# struct {
16 errorChanscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/BaseChannelWrapper#errorChan. <-chan error
17 }
18
19 func (w *BaseChannelWrapperscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/BaseChannelWrapper#) Waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/BaseChannelWrapper#Wait().() error {
20 var multiErr error
21 for err := range w.errorChanscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/BaseChannelWrapper#errorChan. {
22 // Combine in case multiple errors
23 multiErr = errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.Joinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/Join().(multiErr, err)
24 }
25
26 return multiErr
27 }
28
29 func NewBaseChannelWrapperscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/NewBaseChannelWrapper().(errChan <-chan error) *BaseChannelWrapperscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/BaseChannelWrapper# {
30 return &BaseChannelWrapperscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/BaseChannelWrapper#{errorChanscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/BaseChannelWrapper#errorChan.: errChan}
31 }