You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Why the type of failpoint.Value can't be string #62
the definition in the source code about Value's type in "github.com/pingcap/failpoint/failpoint.go"
// Value represents value that retrieved from failpoint terms.
// It can be used as following types:
// 1. val.(int) // GO_FAILPOINTS="failpoint-name=return(1)"
// 2. val.(string) // GO_FAILPOINTS="failpoint-name=return('1')"
// 3. val.(bool) // GO_FAILPOINTS="failpoint-name=return(true)"
Value interface{}
and start my progrom with cmd: GO_FAILPOINTS="mypackagename/demoPanic=return('100')" ./beego-backend
An exception was thrown [panic.go:522] Handler crashed with error interface conversion: failpoint.Value is bool, not string ···
Activity
amyangfei commentedon Nov 5, 2020
ref to: #61
Should use either
GO_FAILPOINTS="mypackagename/demoPanic=return(\"100\")"orGO_FAILPOINTS='mypackagename/demoPanic=return("100")'jinjiaKarl commentedon Aug 5, 2021
when I execute my program, it truns out that:
how come does not it support
"return('0.01')"of this pattern?