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.
This commit is contained in:
parent
ac47d6ba0e
commit
71ae9f7bbc
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user