DEV Community

Cover image for ⏳GitHub Copilot 1-Day Build Challenge : eol, a tiny Go client to manage eols
adriens
adriens

Posted on Edited on

⏳GitHub Copilot 1-Day Build Challenge : eol, a tiny Go client to manage eols

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:

Demo

Repo

GitHub logo adriens / eol

A go client for eols (DEV.to githubchallenge )

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.

YouTube Video

How to build

go build -o eol cmd/main.go
export PATH=$PATH:.
⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung ⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung

How to run

To run the compiled application, use the following command:

eol -h
⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung ⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung
eol -l
⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung ⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung
eol --list
⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung ⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung

This command will list all items from the End of Life API.

# End of life of my favorite java stack
eol maven java quarkus
⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung ⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung



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 (9)

⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung
 
blessing0024 profile image
onome blessing •

and this should be your second challenge submitted. that's 2 wins

⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung
 
adriens profile image
adriens •

Indeed yes ..just in Time for m'y summer break. Thanks for the kind words

⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung
 
adriens profile image
adriens •

⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung
 
adriens profile image
adriens •

⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung
 
adriens profile image
adriens •

⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung
 
adriens profile image
adriens •

⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung
 
adriens profile image
adriens •

⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung
 
adriens profile image
adriens •

⭐ Football Update: adriens/github copilot day build challenge eol a tiny go client to manage eols j - Jadwal Siaran Langsung
 
adriens profile image
adriens •