atc0005 / learn

Various topics that I want to learn more about, either for professional development or for my own use
0 stars 0 forks source link

Golang | Testing | Ignore test flags #71

Open atc0005 opened 4 years ago

atc0005 commented 4 years ago

I ran into this problem when working with setting up tests for the atc0005/elbow project. After discussing it with the alexflint/go-arg developer, I implemented a workaround that saved the current os.Args, injected my replacement values and then restored os.Args after. This seems to work well, but I noticed that the integrii/flaggy lead developer went a different route and it's probably worth studying in more details.