mirror of
https://github.com/zrepl/zrepl.git
synced 2025-08-19 03:06:02 +02:00
zfs: send: improve error reporting by capturing stderr
This commit is contained in:
@@ -27,6 +27,14 @@ type CircularLog struct {
|
||||
mtx sync.Mutex
|
||||
}
|
||||
|
||||
func MustNewCircularLog(max int) *CircularLog {
|
||||
log, err := NewCircularLog(max)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return log
|
||||
}
|
||||
|
||||
func NewCircularLog(max int) (*CircularLog, error) {
|
||||
if max <= 0 {
|
||||
return nil, fmt.Errorf("max must be positive")
|
||||
|
Reference in New Issue
Block a user