3 ms·
Show HN: My first Go project, a useless animated bunny sign for your terminal
Hi HN, I wanted to share my very first (insignificant) project written in Go: a little CLI tool that displays messages with an animated bunny holding a sign.
I wanted to learn Go and needed a small, fun project to get my hands dirty with the language and the process of building and distributing a CLI. I've built a similar tool in JavaScript before so I thought porting it would be a great learning exercise.
This was a dive into Go's basics for me, from package structure and CLI flag parsing to building binaries for different platforms (never did that on my JS projects).
I'm starting to understand why Go is so praised: it's standard library is huge compared with other languages. One thing that really impressed me was the idea (at some point of this journey) to develop a functionality by myself (where in the javascript original project I choose to use an external library), here with the opportunities that std lib was giving me I thought "why don't try to create the function by miself?" and it worked! In the Js version I used the nodejs "log-update", here I write a dedicated pkg.
I know it's a bit silly, but I could see it being used to add some fun to build scripts or idk highlight important log messages, or just make a colleague smile. It's easy to install if you have Go set up:
go install github.com/fsgreco/go-bunny-sign/cmd/bunnysign@latest
Since I'm new to Go, I would genuinely appreciate any feedback on the code, project structure, or Go best practices. The README also lists my planned next steps, like adding tests and setting up CI better.
Thanks for taking a look!
- runjake 1y agoIt's a pretty good start, now add | (pipe) chars to either sides of the phrases, properly aligned and spaced to form a box.
- stgr_codes 1y agomm yes that could be tricky but it's a good feature indeed
- maxmcd 1y agozero deps, nice instructions, how nice
- stgr_codes 1y agothank you :)
- amelius 1y agoNo button to punch the bunny?
- deleted 1y ago[deleted]
- deleted 1y ago[deleted]
- stgr_codes 1y ago(•ㅅ•) why so mean
- kanakenfresse 1y ago[flagged]
- kanakenfresse 1y ago[flagged]
- runjake 1y agodang, new troll account. Ban?
- yomismoaqui 1y agoAlso you can run it directly (no need for npx envy) go run github.com/fsgreco/go-bunny-sign/cmd/bunnysign@latest "hello world"
- stgr_codes 1y agowait what! :O
- hactually 1y agoit's good! you don't need a pkg folder btw - they're not a go standard. check out `internal` as it's recognised by the tool chain and may be what you want
- stgr_codes 1y agoI struggled a bit with the scaffolding indeed, there are a lot of divergent opinions out there in the golang community
- danudey 1y agoSetting up golangci-lint doesn't need any work - just add the golangci-lint Github action to your project: https://github.com/golangci/golangci-lint-action https://github.com/golangci/golangci-lint-action If you're looking to customize things, linter-wise, I would recommend configuring revive: https://github.com/mgechev/revive https://github.com/mgechev/revive It's extremely fast and covers a lot of random stuff that other linters don't seem to but which is still good practice. It can be a bit nitpicky but in a good way.
- stgr_codes 1y agoThank you so much will dig into it!
- deleted 1y ago[deleted]
- ochronus 1y ago<sarcasm> What, no AI?!</sarcasm>
- stgr_codes 1y agono stochastic parrots :D (well, I did ask LLMs some questions about scaffolding and doubts when it comes to std lib, but I always double check their answers, so for me it's not that huge time saving)
- theasisa 1y agoI've been a Gopher for over 8 years and a dev for over 25. I like asking LLMs for suggestions and improvements to my code. Sometimes they offer good insight, a lot of times they don't. No harm in testing!
- stgr_codes 1y agoAgree, if used with good sense then it's a really valid tool in the arsenal.