CLI Tools in Golang

I mentioned in the online meetup that it was easy to build little CLI tools in Golang. I’ve only been using the language for a few days, but here are some examples of what is built in:

To set-up and install the program, see this page:
https://golang.org/doc/code.html

Basically, it’s as easy as:

  1. Write a quick Go program using the examples above
  2. Type go init mod hello_world
  3. Type go install hello_world.go
  4. It’s now compiled and installed on your path, so you can run it with hello_world

There isn’t anything else to install or configure.

1 Like

Why the sudden interest in learning Go?

Someone asked me a question about Go and I didn’t know any Go, so I started looking into it. As an experiment, I thought I would see how much of the language I could learn in 48 hours, since it looks like a pretty simple language.

1 Like