multiError represents errors from multiple conns in the group. TODO: figure out how and whether this is useful to export. End users should not be depending on the transport/grpc package directly, so there might need to be some service-specific multi-error type.
typemultiError []errorfunc ( multiError) () string {
, := "", 0for , := range {
if != nil {
if == 0 {
= .Error()
}
++
}
}
switch {
case0:
return"(0 errors)"case1:
returncase2:
return + " (and 1 other error)"
}
returnfmt.Sprintf("%s (and %d other errors)", , -1)
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.