TUN-7125: Add management streaming logs WebSocket protocol

This commit is contained in:
Devin Carr
2023-04-04 15:45:32 -07:00
parent 5972540efa
commit 93acdaface
53 changed files with 12367 additions and 2 deletions

14
vendor/nhooyr.io/websocket/internal/errd/wrap.go generated vendored Normal file
View File

@@ -0,0 +1,14 @@
package errd
import (
"fmt"
)
// Wrap wraps err with fmt.Errorf if err is non nil.
// Intended for use with defer and a named error return.
// Inspired by https://github.com/golang/go/issues/32676.
func Wrap(err *error, f string, v ...interface{}) {
if *err != nil {
*err = fmt.Errorf(f+": %w", append(v, *err)...)
}
}