mirror of
https://github.com/tenox7/wrp.git
synced 2024-11-22 10:31:21 +00:00
remove debug flag, never used
This commit is contained in:
parent
04a755749e
commit
78c568ac09
8
wrp.go
8
wrp.go
@ -43,8 +43,7 @@ const version = "4.6.0"
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
addr = flag.String("l", ":8080", "Listen address:port, default :8080")
|
addr = flag.String("l", ":8080", "Listen address:port, default :8080")
|
||||||
headless = flag.Bool("h", true, "Headless mode - hide browser window")
|
headless = flag.Bool("h", true, "Headless mode / hide browser window (default true)")
|
||||||
debug = flag.Bool("d", false, "Debug ChromeDP")
|
|
||||||
noDel = flag.Bool("n", false, "Do not free maps and images after use")
|
noDel = flag.Bool("n", false, "Do not free maps and images after use")
|
||||||
defType = flag.String("t", "gif", "Image type: gif|png")
|
defType = flag.String("t", "gif", "Image type: gif|png")
|
||||||
fgeom = flag.String("g", "1152x600x216", "Geometry: width x height x colors, height can be 0 for unlimited")
|
fgeom = flag.String("g", "1152x600x216", "Geometry: width x height x colors, height can be 0 for unlimited")
|
||||||
@ -511,12 +510,7 @@ func main() {
|
|||||||
)
|
)
|
||||||
actx, acancel := chromedp.NewExecAllocator(context.Background(), opts...)
|
actx, acancel := chromedp.NewExecAllocator(context.Background(), opts...)
|
||||||
defer acancel()
|
defer acancel()
|
||||||
switch *debug {
|
|
||||||
case true:
|
|
||||||
ctx, cancel = chromedp.NewContext(actx, chromedp.WithDebugf(log.Printf))
|
|
||||||
default:
|
|
||||||
ctx, cancel = chromedp.NewContext(actx)
|
ctx, cancel = chromedp.NewContext(actx)
|
||||||
}
|
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
rand.Seed(time.Now().UnixNano())
|
rand.Seed(time.Now().UnixNano())
|
||||||
|
Loading…
Reference in New Issue
Block a user