Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide overview and synopsis for packages #154

Closed
orpheuslummis opened this issue Jan 30, 2022 · 6 comments
Closed

Provide overview and synopsis for packages #154

orpheuslummis opened this issue Jan 30, 2022 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@orpheuslummis
Copy link
Contributor

The comment above the package declaration defines the package's overview. The first line of that overview is the synopsis.

Examples:

@orpheuslummis orpheuslummis added the documentation Improvements or additions to documentation label Jan 30, 2022
@jsimnz
Copy link
Member

jsimnz commented Jan 30, 2022

I can't remember, does this apply to any go file within a package, or just the doc.go file?

@orpheuslummis
Copy link
Contributor Author

orpheuslummis commented Jan 30, 2022

I understand doc.go to be a convention and not a special file. All files with suffix .go related to a package are imported when generating documentation with go doc. It seems good practice when using multiple files for a package to have for it a doc.go with the overview, with the first sentence defining its synopsis. The first comment at the top of file is ignored, making it a good place to include a license.

At least with the godoc tool, when multiple Overview comments are defined for a package they are all appended together under the Overview section of the documentation page.

References:

@jsimnz
Copy link
Member

jsimnz commented Jan 30, 2022

Alright, thats good to know!

@orpheuslummis
Copy link
Contributor Author

orpheuslummis commented Feb 3, 2022

Request of suggestions of one-sentence summaries (each package's Sypnopsis) for the following packages:

  • core
  • core/crdt
  • store
  • merkle/clock
  • merkle/crdt
  • db/base
  • db/container
  • db/fetcher
  • datastores/iterable
  • datastores/badger

@orpheuslummis
Copy link
Contributor Author

related to #153

@orpheuslummis
Copy link
Contributor Author

closed by #533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants