8000 docs: add some notes about best practices by muir · Pull Request #51 · muir/nject · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

docs: add some notes about best practices #51

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

Merged
merged 5 commits into from
Jan 14, 2023
Merged

docs: add some notes about best practices #51

merged 5 commits into from
Jan 14, 2023

Conversation

muir
Copy link
Owner
@muir muir commented Jan 14, 2023

No description provided.

@muir muir requested a review from sharnoff January 14, 2023 04:42
Copy link
Collaborator
@sharnoff sharnoff left a comment

Choose a reason for hiding this comment

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

Generally structure of this change looks good. I think doc.go is missing a kind of quick, friendly & familiar example to set the ball rolling — something mostly contrived, but not quite as bad as "here's three string types". Maybe something with strconv.ParseInt() and/or Context?

I'd imagine something like:

  1. Explain generally what dependency injection does (done)
  2. Say something like "here's a simple example that does XYZ" - it shoud be <= 15 lines, but commented to explain how data is passed from one function to another.
  3. From there, start talking about injectors, providers, etc — readers should have a basic idea to build from, first. And as you introduce concepts, you can link back to the first example — like "ABC was an example of a DEF" or "DEFs are more flexible than just ABC"

Co-authored-by: sharnoff <29154784+sharnoff@users.noreply.github.com>
@codecov-commenter
Copy link
codecov-commenter commented Jan 14, 2023

Codecov Report

Base: 83.70% // Head: 83.70% // No change to project coverage 👍

Coverage data is based on head (25f1ca9) compared to base (9aa51ed).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #51   +/-   ##
=======================================
  Coverage   83.70%   83.70%           
=======================================
  Files          21       21           
  Lines        2989     2989           
=======================================
  Hits         2502     2502           
  Misses        317      317           
  Partials      170      170           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

muir and others added 3 commits January 13, 2023 22:29
Co-authored-by: sharnoff <29154784+sharnoff@users.noreply.github.com>
@muir muir merged commit 0c3a05f into main Jan 14, 2023
@muir muir deleted the best-practices branch January 14, 2023 08:29
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.

3 participants
0