
GoDoc: package letsencrypt - zerognowl
https://godoc.org/rsc.io/letsencrypt
======
zalmoxes
Also see
[https://godoc.org/golang.org/x/crypto/acme](https://godoc.org/golang.org/x/crypto/acme)
and [https://github.com/xenolf/lego](https://github.com/xenolf/lego)

Go has some of the best letsencrypt tooling out there, and there was even some
support for merging ACME support directly into net/http
[https://github.com/golang/go/issues/17053](https://github.com/golang/go/issues/17053)

~~~
mikecb
I just recently used lego for dns based issuance, and it was excellent.

~~~
petre
True. I've tried 3 or 4 clients in Perl, Node.js. Only lego worked flawlessly.
And the Caddy HTTP/2 webserver also has excellent ACME support.

------
mholt
I'll be speaking about these various ACME packages for Go at dotGo next month.
ACME is a little tricky, and each package has optimal use cases for best
results.

------
danielsamuels
Out of interest, is the built-in Go server what everyone uses for hosting
their Go websites? I'm used to the typical Nginx / Gunicorn / Python stack and
Python's built-in server is used for nothing more than development.

~~~
technoweenie
We typically run go's built-in server behind nginx. There's no need for
something like gunicorn in go.

~~~
jensvdh
But this would not work in this set-up right? Wouldn't the user facing server
(in your case Nginx) have to be the one that serves over HTTPS?

I'm a bit confused about this package.

------
theqbit
There is also
[https://github.com/dkumor/acmewrapper](https://github.com/dkumor/acmewrapper)

I like this one in particular, since it requires only a couple lines of code.

------
aomix
There seem to be slightly fewer Lets Encrypt and ACME implementations than
stars in the sky. Which is fantastic. Last week I read about a
privsep/chroot/pledge'd (OpenBSD thing) C implementation
[https://kristaps.bsd.lv/acme-client/](https://kristaps.bsd.lv/acme-client/) .

------
nabucodonosor
wondering why not using `defer m.mu.Unlock()` right after line 279:
[https://github.com/rsc/letsencrypt/blob/a18c646c3d0772313b7b...](https://github.com/rsc/letsencrypt/blob/a18c646c3d0772313b7b53c78847bb3eb6463f0b/lets.go#L288)

~~~
barpet
no reason imho..the function is pretty trivial. But also not a reason not to
use it as a performance impact would be minimal :-)

~~~
junke
The behavior is different if a panic occurs, isn't it? But is there any chance
that this particular initialization code might panic in the first place?

~~~
schmichael
Given the current code and no races against the values being initialized: no,
there is no chance for a panic.

~~~
alpb
This is not a good assumption. The code will panic, for instance when it can't
allocate memory, or runs into signal handling issues.

------
Ianvdl
Here is the package on RSC's github page:
[https://github.com/rsc/letsencrypt](https://github.com/rsc/letsencrypt)

------
dingdingdang
Does any of the code snippets on the godoc site constitute a fully working
example? The sheer amount of library stuff I go through on a daily webdev
basis makes me dizzy at times!

~~~
ereyes01
Your application likely uses more routes, and has other real work to do that
won't be as brief as the example. However, the examples do work for me, and
seem like a great place to start building up from.

