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

Refactoring and code hygiene #88

Merged
merged 3 commits into from
Jul 10, 2022
Merged

Refactoring and code hygiene #88

merged 3 commits into from
Jul 10, 2022

Conversation

chelnak
Copy link
Owner

@chelnak chelnak commented Jul 10, 2022

No description provided.

Prior to this commit the internal package for the show cmd was named
markdown.

In this commit, we rename the package to show so that it matches it's
counterpart and is less ambiguous.
@chelnak chelnak added the enhancement New feature or request label Jul 10, 2022
@chelnak chelnak self-assigned this Jul 10, 2022
chelnak added 2 commits July 10, 2022 17:02
This commit addresses a couple of different issues with this package.

Previously, everything was lumped in to `client.go`. This was fine
initially but it became harder to manage as the codebase grew.
Domains are now separated in by file.
Future work is probably needed to subdivide each domain in to it's own
package to prevent leakage.

Secondly, the methods for Tags and Pull were a bit scrappy and not very
efficient.
This was a left over from the "get it done" phase of the
project. These instances have now been resolved and I think the
implementation is closed to O(n) (maybe.. either way it's less garbage
than it was before).
In this commit we move the template out of the method for readability.
Also, because tmpl.Execute returns an error we don't actually need to do
error checking in the method. We can just pass the result (error or nil)
back to the caller.
@chelnak chelnak force-pushed the refactoring_and_code_hygiene branch from df6391f to 5175311 Compare July 10, 2022 16:03
@chelnak chelnak merged commit 5b3b237 into main Jul 10, 2022
@chelnak chelnak deleted the refactoring_and_code_hygiene branch July 10, 2022 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant