Replies: 3 comments 3 replies
-
Was recently recommended these Go libraries for console stuff by @goblinfactory
May be of use here |
Beta Was this translation helpful? Give feedback.
-
Go is a great language if you've come from C# ; you'll enjoy the simplicity and it will make you a better C# programmer. Adam mentioned me by name, and this is the first time I've seen the code, so not familiar with the project history, just reading from the top, and then a quick peek at the project, (appears to be a single bash file for self evident simplicity and reviewability and trusty-ness) ,that makes perfect sense. I think the concern about transparency is valid. While go binaries can be distributed as Brew binaries; if you already have Go installed, you can install utilities from source with a single command, my 2 cents; Here are some go references that I think would be relevant here; Go standard library for parsing command line flags; start here The next level up from that accepting more complex command line options; as shown here Followed by more higher level abstractions like Cobra etc. Though the Go community frown upon you starting with a complex library until you've exhausted all simpler options first. I will take a look at the projects, I have a good friend who keeps telling me to setup a pihole for my home network. This is a good nudge to go do that; maybe I can help out somehow. cheers, |
Beta Was this translation helpful? Give feedback.
-
I think we should keep it a shell script, because that's more 'hackable'. Your executable is your source code, and your source code is your executable. Just tweak the code and run! No compiling needed. Go is a nice language, but I think that for simple use cases like this one, it's better suited to be a single-file shell script. Also, shell scripts have and advantage that you always have a REPL for it :) |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
bash
is great but it's close to hitting it's limits as far as extensibility and maintenance. I'm considering porting this to a new language and I'm looking for thoughts and ideas. My first thought is to usegolang
but that is a compiled language and would remove some of the transparency of the code. All the code would still be open source and available here with instructions to compile yourself if you felt that was more comfortable.I may turn this in to a discussion topic if there are people interested in this or have other ideas and concerns.
Beta Was this translation helpful? Give feedback.
All reactions