-
Notifications
You must be signed in to change notification settings - Fork 9
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
test: add package example #12
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 60 59 -1
=========================================
- Hits 60 59 -1 ☔ View full report in Codecov by Sentry. |
92d3b5e
to
375e95f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @wazazaby, thank you for your contribution in open-source, you are doing an amazing job!
I reviewed your code and it looks good, the only one thing is that moving example_test.go
in the examples
directory could be better than placing it in the main package.
Something like:
examples/json.go
So, if you could change that, I'm ready to merge.
375e95f
to
3c96658
Compare
Thank you for the review! Agreed, the example as now been moved to an |
@LukaGiorgadze the file should actually be named |
hah yeah, I merged the PR, feel free to rise a new one! |
Examples are usually runnable like tests and I believe it's a good thing to have them "interactive" instead of a plain text file (the README would suffice in this case). If you want to keep them that way it's fine tho. |
nah, never used examples like that before, but frankly not bad for this kind of repo. Feel free to rise PR, i'll approve it 👍 |
Great! |
Hi!
Just a small pull request that includes a little bit of refactoring :
any
instead ofinterface{}
if
statementconvertToType
internals to improve readabilityAnd most importantly a package example to demonstrate how to use
gonull
and what it brings to the table.As there are no exported functions other than
NewNullable
(which is very straightforward and documented), I think that a package-wide example is fine for now.I based it off the example that you wrote in the README file.
Let me know if anything bothers you.
Thank you :)