mirror of
https://github.com/tenox7/wrp.git
synced 2024-11-21 19:30:48 +00:00
if/else to switch
This commit is contained in:
parent
fdfbe80024
commit
9cd286add8
5
wrp.go
5
wrp.go
@ -475,9 +475,10 @@ func main() {
|
||||
)
|
||||
actx, acancel := chromedp.NewExecAllocator(context.Background(), opts...)
|
||||
defer acancel()
|
||||
if debug {
|
||||
switch debug {
|
||||
case true:
|
||||
ctx, cancel = chromedp.NewContext(actx, chromedp.WithDebugf(log.Printf))
|
||||
} else {
|
||||
default:
|
||||
ctx, cancel = chromedp.NewContext(actx)
|
||||
}
|
||||
defer cancel()
|
||||
|
Loading…
Reference in New Issue
Block a user