diff --git a/internal/encoder/vars/errors.go b/internal/encoder/vars/errors.go index 2e7622421..2b5bd1b82 100644 --- a/internal/encoder/vars/errors.go +++ b/internal/encoder/vars/errors.go @@ -58,7 +58,7 @@ const ( func GoPanic(code int, val unsafe.Pointer) { switch(code){ case PanicNilPointerOfNonEmptyString: - panic(fmt.Sprintf("val: %#v has nil pointer while its length is not zero!", (*rt.GoString)(val))) + panic(fmt.Sprintf("val: %#v has nil pointer while its length is not zero!\nThere maybe a data race problem. Recommand executing the tests about code with `-race` compile flag.", (*rt.GoString)(val))) default: panic("encoder error!") }