-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Description
What is the URL of the page with the issue?
https://pkg.go.dev/github.com/urfave/cli/v3@v3.0.0-alpha4#example-Command.Run-NoAction
This reports a bug that renders some testable examples without a main block, making them not runnable. It seems to happen anytime the import path ends with a vN major version suffix that doesn't match the package name.
See the corresponding testable example code here and the import that ends in /v3 here. Using an import alias that matches the package name resolves the issue. For example:
import cli "github.com/urfave/cli/v3"What is your user agent?
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/113.0
Screenshot
What did you do?
Go to https://pkg.go.dev/github.com/urfave/cli/v3@v3.0.0-alpha4#example-Command.Run-NoAction and try to run the "NoAction" example (or any example for the github.com/urfave/cli/v3 package).
What did you expect to see?
A runnable code example with a main block and a "Run" button.
What did you see instead?
A code example with no main block and no "Run" button.