err := rod.Try(func() { page.Timeout(60 * time.Second).MustNavigate(url).MustWaitLoad().CancelTimeout() })
if errors.Is(err, context.DeadlineExceeded) {
fmt.Println("超时错误")
return nil
} else if err != nil {
fmt.Println("其他错误")
return nil
}
标签:nil,err,fmt,rod,go,超时 From: https://www.cnblogs.com/angdh/p/17111315.html