This coming from someone who does Java for almost a decade, Android for 7ish yers and Node for couple of years. So apologies if it seems biased.
From what I got, it’s just easier to start with GO, esp you have some scripting background. Something of fresh air. It’s like a good mix of fast code to result time of Node (npm is far better than gradle in running speed, and Go beats both of them.) and Type system like Java. When-earlier this week- I started to get grasp of GO, I felt like I was learning Kotlin once again, a modern solution to modern problems and a fresh air above old languages. It was fast and fun to Code.
But my daily work include either a full serverless app, or some standalone scripts (helping deployment). In both the case, workflow is powered single JS file scripts, sometimes backed by whole modules, sometimes they’re standalone. I can easily arrange JS scripts the way I see fit. And mainly, I can put many files in single folder, and either create as many executables from these, or upload them as single lambdas, or even put them as helpers. The project structure really helps me to not to worry about things.
But In GO, my script binary output is decided by a go file having `package main`. In one directory, I can only have one Main file. That means I can’t have multiple GO files that can give me multiple lambdas or multiple executable in same directory, I need to create a new directory for each lambda or each executable I want. Imagine having 200 lambdas and 5 scripts, we need 205 directories, which IMO don’t scale that well.
If I have an express like server, or something of a standalone CLI, or Something that runs nice with docker, GO will run wonders. But If I am going on serverless route or bunch of CLI scripts, creating deployable and managable script is a big effort, way bigger than learning GO itself.
How are you handling such situations?