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

Refactored functions and added tests #22

Merged

Conversation

quamejnr
Copy link
Contributor

@quamejnr quamejnr commented Aug 5, 2023

What is this?

This refactors some functions and introduce afero library to include dependency injection in functions.

Why this?

This ensures writing tests are easier by passing in an instance of a filesystem

How are you doing this?

Creating instance so filesystem using the afero library https://github.com/spf13/afero and passing them as arguments into functions

Copy link
Owner

@hacktivist123 hacktivist123 left a comment

Choose a reason for hiding this comment

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

Just checked this out, fantastic!

We can adopt that testing library going forward

@hacktivist123 hacktivist123 merged commit 90d2883 into hacktivist123:main Aug 5, 2023
1 check passed
hacktivist123 added a commit that referenced this pull request Aug 5, 2023
* Refactored functions and added tests

* add filesystem

* Update main.go

update afero.walk() arguments

---------

Co-authored-by: Shedrack akintayo <akintayoshedrack@gmail.com>
hacktivist123 added a commit that referenced this pull request Aug 5, 2023
* Update README.md

* change package name

* change package name

* add license

* Update README.md

* fix error where installation failed due to incorrect module path

* fix

* update readme

* Update README.md

* add env files

* Improve language detection code and add new gitignore files

* update .gitignore

* another fix

* update and lint main.go (#6)

* Fix binary error (#7)

* update and lint main.go

* implement fix for error where goignore cannot find the gitignore templates file

* test binary

* Create github action (#11)

* Impr/file detection (#9)

* update README with todo list for next release

* fix tasks list syntax (#13)

* scrap auto flag (#16)

* scrap auto flag, make auto-detect my default and implement logic for error if a language isn't supported

* update README with new instructions

* Goreleaser configuration  (#17)

* feat: goreleaser configuration

* Change go version for goreleaser

* Update .goreleaser.yaml

---------

Co-authored-by: Shedrack akintayo <akintayoshedrack@gmail.com>

* Update release.yml (#18)

* added fix for language detection (#20)

* feat: implemented a function(and a flag) to initialize an empty git repository (#21)

* feat: implemented a function(and a flag) to initialize an empty git repository

* chore: mark todo to allow users init git repo as done

* update README with new command

* update README structure (#24)

* Update go.yml (#26)

* Refactored functions and added tests (#22)

* Refactored functions and added tests

* add filesystem

* Update main.go

update afero.walk() arguments

---------

Co-authored-by: Shedrack akintayo <akintayoshedrack@gmail.com>

* update gh actions

* Update README.md

* Update README.md

---------

Co-authored-by: Kwame Akuamoah-Boateng <kaboateng14@gmail.com>
Co-authored-by: Daniel Adeboye <adeboyed93@gmail.com>
Co-authored-by: Khagan Chuks <chuksgpfr@gmail.com>
Co-authored-by: Nonso Unachukwu <noornee.011@gmail.com>
@quamejnr quamejnr deleted the impr/refactor-detect-language branch August 6, 2023 13:52
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