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

doc: Update container package overview #1065

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

JonasBakys0
Copy link

Description:

  • Updates incorrect overview for container package
  • issue

Checklist:

  • I have formatted my code using goimport and golangci-lint.
  • All new code is covered by unit tests.
  • This PR does not decrease the overall code coverage.
  • I have reviewed the code comments and documentation for clarity.

@@ -1,3 +1,6 @@
// The container package provides a centralized structure to manage common application-level concerns such as
// logging, connection pools, and service management. This package is designed to facilitate the sharing and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also include data sources which comprises of different databases, pubsub, filesystem etc.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Also, I have a question about documentation in go. I saw that package container is used in many files which made me wonder what is the best way to document such package? How do I choose which file to add documentation?

Copy link
Member

@aryanmehrotra aryanmehrotra Oct 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

container.go is the central file which also has the container struct. So it is the best file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to add some references but couldn't figure out how exactly it works in godoc 😄

Supported data sources:
  - Databases ([cassandra], [clickhouse], [mongo], [solr], [dgraph], [sql])
  - Key value storages [redis] [kafka]
  - Pub/Sub systems ([google], [kafka], [mqtt])
  - File system [file]

Results:
image

Even more links to other packages generate false(not found) URL at least locally
Can you help me with this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may refer to the following documentation
https://tip.golang.org/doc/comment#links

@JonasBakys0
Copy link
Author

I dropped the link idea because it seemed too complicated. For example:

  • If I want to use the doc link I face this issue:
    image
  • And with Links, it's hard to maintain them. What if cassandra package location change
// [Cassandra]: https://pkg.go.dev/gofr.dev/pkg/gofr/datasource/cassandra

Either way, please correct me if I'm wrong. Go is new to me and don't know how idiomatic documentation should look like in go 😄

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

Successfully merging this pull request may close these issues.

2 participants