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

Make examples compile and in godoc #60

Closed
wants to merge 4 commits into from

Conversation

Brian-Williams
Copy link

This will compile the tests so that it will fail if breaking changes are made.
It will show these examples in godoc.
Screenshot 2024-10-20 at 3 07 30 PM
Screenshot 2024-10-20 at 3 07 45 PM

This will compile the tests so that it will fail if breaking changes are made.
It also will show these examples in godoc.
@generall generall requested a review from Anush008 October 20, 2024 23:04
Copy link
Member

@Anush008 Anush008 left a comment

Choose a reason for hiding this comment

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

Hey @Brian-Williams. I see you had to move the examples to the src directory for them to show in godoc.

Do you think the examples will have more visibility in godoc? I think the examples directory is more visible.
When the CI doesgo build ./..., the examples directory is also compiled.

P.S. https://pkg.go.dev/github.com/qdrant/go-client does have a reference to the examples below.

@Brian-Williams
Copy link
Author

Hey @Anush008. Libraries like NATS sometimes do have both godoc and examples folders. If we were only going to do one I would prefer godoc, but we can always do both.

It does get built, but differently than the client. Moving the file broke CI and it needed to be updated to pass gocritic. Also, I think we could add an output and actually run some of these. If we'd prefer to just keep examples as a link to source in godoc we can close.

@Anush008
Copy link
Member

These SDK methods are tested separately and since the examples directory is also checked during compilation, I think a reference to the examples directory in the API reference should suffice.
What do you think?

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