-
Notifications
You must be signed in to change notification settings - Fork 716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interface Panic #651
Comments
This problem can be avoided by calling SetDebug once when *resty.Client is initialized globally. This is a trigger example: var wg sync.WaitGroup
c := resty.New()
for i := 0; i < 10; i++ {
wg.Add(1)
go func(i int) {
if i%2 == 0 {
c.SetDebug(true)
} else {
c.SetDebug(false)
}
_, err := c.R().Get("https://www.feishu.cn")
fmt.Println(err)
wg.Done()
}(i)
}
wg.Wait() |
Thank for your answer, but why you don't return an error if it's empty. This error makes crashing app |
I am not a developer of resty, I encountered the same problem as you, the reason for this problem is that resty encountered an unexpected assertion, resty needs to fix it |
receiving a response (I don't know what exactly response from third party), and I've got a panic
So what should I need to avoid this panic. Thank you
Code
Error
The text was updated successfully, but these errors were encountered: