Well, what is eagle? Eagle is a simple, fast, and fun CLI-based application which functions as a helper to find answers to your programming questions.
Eagle works by searching for your questions in Stack Overflow, and allowing you a plethora of options to get your answer to you as quickly as possible.
This project was created with the intention of learning the language in more depth, and what it lacks in merit I have gained in knowledge. Feel free to use it if it helps you!
Takeaways:
- Got to know 'Cobra' in more detail, and I wasn't too much of a fan due to the overwhelming out-of-the-box functionality. Might try other libraries in the future.
- Though the script was very limited in it's scope, I got to understand net/http as well as encoding/json better.
- Bits about httptest, testing an application in general, go-releaser, Go folder structuring & much more.
- Clone the git repository.
- Go inside the desired directory containing the main.go file.
- Lastly run: $ go build
Alternatively, you can follow the steps below:
- Head over to the official stable releases page.
- Download the binary for your specific system, then proceed to unpack it.
After that, you're ready to use eagle.
To search for the query "How to install Go?", sorted by votes & a maximum of 5 results: (both work)
$ .\eagle.exe search "How to install Go?" votes 5
$ .\eagle.exe search -t: "How to install Go?" -s: votes -r: 5
or... How to center a div? Using a default sort & max results:
$ .\eagle.exe search "How to center a div?"
Example Display:
Any further information about this application is available under --help.
To ensure the software is working as intended, you can run the tests by typing in "go test -v" in your terminal, inside /cmd/.
Licensed under the MIT License - see the LICENSE file for more details.