From 71ae9f7bbcd7c1aa9fe2cd6ecfc8218f93da5931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 16 Apr 2019 14:26:36 +0900 Subject: [PATCH] clarify that Run won't work with an allocator context We made the function error with ErrInvalidContext in that case, but the godoc was still a bit ambiguous. Make it clearer to avoid confusion. For #299. --- chromedp.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chromedp.go b/chromedp.go index 3235e37..05a81eb 100644 --- a/chromedp.go +++ b/chromedp.go @@ -149,9 +149,8 @@ func Cancel(ctx context.Context) error { return c.cancelErr } -// Run runs an action against the provided context. The provided context must -// contain a valid Allocator; typically, that will be created via NewContext, or -// via one of the allocator constructors like NewExecAllocator. +// Run runs an action against context. The provided context must be a valid +// chromedp context, typically created via NewContext. func Run(ctx context.Context, actions ...Action) error { c := FromContext(ctx) // If c is nil, it's not a chromedp context.