rod icon indicating copy to clipboard operation
rod copied to clipboard

Prevent abuse of chained methods

Open claudioquaglia opened this issue 2 years ago • 1 comments

During some tests for issue #795, I've done an error creating the browser like:

browser := rod.New().Client(l.MustClient()).MustIncognito().MustConnect()

instead of the correct way:

browser := rod.New().Client(l.MustClient()).MustConnect().MustIncognito()

Since I've run it on the docker container I didn't get any panic, maybe adding some defensive logic to prevent this type of error can be helpful

claudioquaglia avatar Feb 01 '23 09:02 claudioquaglia

Please add a valid Rod Version: v0.0.0 to your issue. Current version is v0.112.3

Please fix the format of your markdown:

8 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```go"]
12:145 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]

generated by check-issue

rod-robot avatar Feb 01 '23 09:02 rod-robot