GO and why want to use it
When I went to school, I learned shell scripting (specifically ksh), C, Pascal and assembler. When I say “learned”, I mean just enough to get me started with any of them. Then I started work and I added perl to my portfolio. Perl was big back then. It was and still is amazing for working with text files. Analyzing logs and such. However, perl slowlt … died. It’s not dead but just less and less popular. Python is the new big thing. A very good language. I did quite a bit in it.
Perl and python had one common problem. Libraries. There is a good set of standard libraries, but if you need additional ones, it becomes a pain. Let me be more specific. If you need additional libraries for a script that runs on random servers, it becomes a pain. You can’t just drop the script onto the server anymore. Depending on the server, that can be an issue. There are solutions where you “compile” or package everything together, but I found that they don’t always work. Especially if you need to go cross platform.
Go wasn’t on my radar for quite some time. Once I learned that it creates a single, self contained binary, I was intrigued. It’s also very easy to compile for several platforms. It also seems that go has quite a bit of libraries to make CLI tools better. Besides pflags there is also cobra and many others.
I did a few small things, and now I am working on a bigger cli tool. I guess, bigger is relative. Yes, I am using AI to help me along. It helped me to create a bare bone. I can give it python code or ask specific questions on how to do something and have it give me go code. I then can read that, understand it and transport it into my code.
This post becomes more a post about AI. I agree that AI has it’s downsides. Especially if you just take what AI produces without checking, interpreting and adapting. At the same time, it can be a very easy way to jump start you when switching to another language. You still need to put the effort in and actually write code.