Your first post is a packager idea (e.g. like
snap, etc in Linux OS; or Apple/Windows/Play Store). You just need to focus on developing that as a development direction where you just need to comply some kind of distribution rules (e.g. https://wiki.debian.org/DebianRepository/Format) or define your own.
Also, I’m confused with your latest example which sounds like a simple downloader: are you looking for flag llibrary? If you want high tech savvy version, cobra and/or viper should do the trick. As for downloads, you can take a look at a lot of download examples (e.g. https://golangbyexample.com/download-image-file-url-golang/).
Anything below for the downloader idea is overkill in my opinion. If I place my bet, you won’t be needing it. I’m listing them out since I don’t know what’s in your mind and what’s the actual idea.
If you’re looking for dynamic scripting in Go (e.g. python via cython under the hood) intepreter, you can take a look at tengo project. Don’t go for “shell interpreter” libraries. If I’m gonna shell, I just shell it with
os.Execute; It doesn’t need to creep into Go binary.
If you’re looking for something like dynamic loading, Go has native plugin library for you to dynamically load compiled Go binary and use it on-the-fly.