What I Built
A very raw & basic implementation of the famous hugovk/norwegianblue
- aka. eol
- wich is:
"CLI to show end-of-life dates for a number of products."
See below about the tool and API:
⌛ Manage EoLs like a boss with endoflife.date 🛑
adriens for opt-nc ・ Dec 14 '22
Demo
Repo
About this project
This project was made within 2 hours as part of GitHub Copilot 1-Day Build Challenge.
EOL CLI
This CLI application lists items from the End of Life API.
How to build
go build -o eol cmd/main.go
export PATH=$PATH:.
How to run
To run the compiled application, use the following command:
eol -h
eol -l
eol --list
This command will list all items from the End of Life API.
# End of life of my favorite java stack
eol maven java quarkus
Copilot Experience
I only used GH Copilot Chat to code this app as I almost know nothing about Go...but I find its distribution much nicer...
The whole code was made from prompting, including the workspace creation at the very beginning of the project.
I first started to ask to implement the --list
option by providing him the most simple API endpoint. It almost worked out of the box : I did a very few prompts to make it modify the resulting behavior.
Then I added the most interesting option to get a single product details, print a formatted table, add colors according to eol dates, print console output with the GH markdown
flavor.
I struggled a bit with non well structured output types from the API that are sometimes boolean or dates...
👉 Finally I asked it to create the README.md
file and that made the first running prototype.
Conclusion
I really enjoyed a lot the resulting prototype I manage to get within almost 2 hours and it gave me the confirmation that I wanted to spend more time to make a clean code and lear more about Go best practices and probably use Cobra.dev (A Framework for Modern CLI Apps in Go) to learn while building something fun yet useful.
Top comments (8)
and this should be your second challenge submitted. that's 2 wins
Indeed yes ..just in Time for m'y summer break. Thanks for the kind words