feat: kubesphere 4.0 (#6115)
* feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> * feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> --------- Signed-off-by: ci-bot <ci-bot@kubesphere.io> Co-authored-by: ks-ci-bot <ks-ci-bot@example.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
committed by
GitHub
parent
b5015ec7b9
commit
447a51f08b
12
vendor/go.uber.org/zap/writer.go
generated
vendored
12
vendor/go.uber.org/zap/writer.go
generated
vendored
@@ -48,21 +48,21 @@ import (
|
||||
// os.Stdout and os.Stderr. When specified without a scheme, relative file
|
||||
// paths also work.
|
||||
func Open(paths ...string) (zapcore.WriteSyncer, func(), error) {
|
||||
writers, close, err := open(paths)
|
||||
writers, closeAll, err := open(paths)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
writer := CombineWriteSyncers(writers...)
|
||||
return writer, close, nil
|
||||
return writer, closeAll, nil
|
||||
}
|
||||
|
||||
func open(paths []string) ([]zapcore.WriteSyncer, func(), error) {
|
||||
writers := make([]zapcore.WriteSyncer, 0, len(paths))
|
||||
closers := make([]io.Closer, 0, len(paths))
|
||||
close := func() {
|
||||
closeAll := func() {
|
||||
for _, c := range closers {
|
||||
c.Close()
|
||||
_ = c.Close()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,11 +77,11 @@ func open(paths []string) ([]zapcore.WriteSyncer, func(), error) {
|
||||
closers = append(closers, sink)
|
||||
}
|
||||
if openErr != nil {
|
||||
close()
|
||||
closeAll()
|
||||
return nil, nil, openErr
|
||||
}
|
||||
|
||||
return writers, close, nil
|
||||
return writers, closeAll, nil
|
||||
}
|
||||
|
||||
// CombineWriteSyncers is a utility that combines multiple WriteSyncers into a
|
||||
|
||||
Reference in New Issue
Block a user