You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Being in the same package, the example test file can refer to functions such as RESTClient and Exec as local, as opposed to gh.RESTClient and gh.Exec. This presents some challenges:
the examples cannot be copied as is
it can be confusing to Go newcomers, who may not be familiar with how to solve the issue
I would like to suggest changing the package of the example file and updating the functions in it.
Activity
mntlty commentedon Nov 4, 2022
A concrete implementation is in 114787b in case this makes sense to others
mislav commentedon Nov 5, 2022
Thanks for bringing this up. Will the examples still get rendered of on the main page of generated docs? If so, I'm in favor of this 👍
mntlty commentedon Nov 7, 2022
@mislav I ran
godoc -http=:6060on the example branch, and it renders the examples while adding theghpackage. Comparing local output for http://localhost:6060/pkg/github.com/cli/go-gh/#example_RESTClient_advancedFrom trunk:
From the example branch:
is there something else I should check for?
mislav commentedon Nov 7, 2022
Nice, thanks for checking! Please send a PR for this 🙇
mntlty commentedon Nov 7, 2022
done!