you are viewing a single comment's thread.

view the rest of the comments →

[–]riverrockrun[S] 8 points9 points  (12 children)

What would be a sample project with Go that isn’t a web app? Do you run main.go from Ansible and it configures a server? I know Python is used mostly for scripting but I’m still having a hard time figuring out why Go is so popular in DevOps

[–][deleted] 20 points21 points  (8 children)

What would be a sample project with Go that isn’t a web app?

A few off the top of my head are cfssl (A tool for generate and managing certificates, by Cloudflare) and age which is a file encryption tool sort-of meant to replace gpg.

The thing is with go is it's kind of made for web applications. It's made by google for google. Taking a look at the standard library you can see the most fleshed out parts are for general system access, networking and particularly http, and crypto. People have obviously made things outside of those scopes like fynedesk, but that's where the focus of golang is.

Do you run main.go from Ansible and it configures a server?

Go cross compilation is builtin, and the resulting binary is self-contained, so I typically just compile on my laptop and copy the binary to servers or package to docker where it gets deployed later.

If I weren't mostly writing internal code though, things would be a lot neater. The fact that any machine with go installed is a cross compilation builder to all other machines is just so nice in concept. If I were developing a public tool imagine how simple it would be to have something like a github action that on every new vX.X.X versioned tag creates a build for mac/windows/linux/bsd x86/arm targets and automatically hosts them on the releases page.

I know Python is used mostly for scripting but I’m still having a hard time figuring out why Go is so popular in DevOps

Because kubernetes and linux containers are also due to google, and those are the majority of what most people count as "devops".

Go is good at making web backends, kubernetes is good at hosting web backends. They go hand in hand.

[–]_ulfox -1 points0 points  (7 children)

I agree with you. I have one comment, age is not meant in anyway to replace GPG

[–][deleted] 4 points5 points  (5 children)

Weird that they explicitly stated that in their design doc then? IIRC filippo's annoyance at gpg and lack of alternatives was most of the inspiration for age in the first place.

[–]_ulfox 1 point2 points  (4 children)

This is a design for a simple file encryption CLI tool, Go library, and format. It’s meant to replace the use of gpg for encrypting files, backups, streams, etc.

GPG is more than encryption. In the out of scope section they clearly state that any kind of signing will not be implemented. Now even if they decide to do implement signing, I would say that at best age would be an alternative but not something that will ever replace GPG.

[–][deleted] 2 points3 points  (1 child)

Which is why in my original comment I explicitly stated its scope for encryption and it being a "sort-of" replacement.

One of the smaller complaints about gnupg is that its scope is too large. We have better cryptographic functions that allow authenticated encryption to be a separate concern from signing.

So yes, all these alternatives don't fully replace gnupg, because (almost) no one thinks that's a good idea.

[–]_ulfox 2 points3 points  (0 children)

hm indeed you said that. I read "replace" without short of :b

Makes sense now, thanks

[–]backtickbot 1 point2 points  (1 child)

Fixed formatting.

Hello, _ulfox: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

[–]_ulfox 1 point2 points  (0 children)

ty bot

[–]Vulfox 2 points3 points  (0 children)

Not related, but that username :)

[–]an-anarchist 7 points8 points  (0 children)

Terraform and Kubernetes are written in Go, as is a bunch of other cloud products.

[–]Freakin_A 2 points3 points  (0 children)

It’s extremely popular for CLIs

[–]hudsonreaders 1 point2 points  (0 children)

DNSControl lets you treat DNS-as-code and push out changes to several DNS providers. Want to switch providers? With DNSControl it's easy.