mirror of
https://github.com/status-im/status-go.git
synced 2025-01-24 21:49:54 +00:00
0babdad17b
* chore: upgrade go-waku to v0.5 * chore: add println and logs to check what's being stored in the enr, and preemptively delete the multiaddr field (#3219) * feat: add wakuv2 test (#3218)
15 lines
326 B
Go
15 lines
326 B
Go
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)...)
|
|
}
|
|
}
|