DeepImage-an-Image-to-Image-technology icon indicating copy to clipboard operation
DeepImage-an-Image-to-Image-technology copied to clipboard

Is there any demo or userguide for failpoint?

Open sh1yu opened this issue 6 years ago • 7 comments

I cannot have any idea that how to use failpoint. I tried write demo like this:

 var outerVar = "declare in outer scope"

err := failpoint.Enable("failpoint-name", "return")
if err != nil {
	fmt.Println(err)
	return
}

failpoint.Inject("failpoint-name", func(val failpoint.Value) {
	fmt.Println("unit-test", val, outerVar)
})

There isn't have any output. How could I use it in the right way?

sh1yu avatar May 01 '19 09:05 sh1yu