I like to find out how things work.
I'm a SWE at Google in Los Angeles (this feed is all personal stuff).
I like to find out how things work.
I'm a SWE at Google in Los Angeles (this feed is all personal stuff).
@gloriouscow I used to have this problem with soldering iron tips too but I thought as I gained experience I just got better at religiously tinning and cleaning the tip every time I use it or put it down.
Maybe it was just buying a slightly better iron.
I keep thinking about this new API I made and it's frustrating I just can't seem to find a way to make it perfect.
I found a way that I think is the only good way to make the blocking version that allows full control of customizing your goroutine lifecycle and logging etc but then actually using it in the usual way people want to is kind of difficult.
I think I might just leave some of the helper functions that I'm not happy with private for now. I remember thinking I should commit and make it public and make sure it works now so I don't have to change the lower level blocking API again and maybe I've done that.
It's basically the blocking function takes a callback to report renewed leases or certs to another thread and so I made a helper function that returns a handler and turns that into a tls.Config and a port number from a channel so you wait for the first registration to be done. It's just complicated and kind of weird.
At least the API most people would use that spawns the background goroutine for you is pretty nice, I can do all that stuff internally.
I'm really obsessing over the API of this thing maybe more than it deserves. I just don't want to break compatibility again.
Anyway I might just call it done enough, soon hopefully.
Omg go select statements do not allow fallthrough between cases!
I wrote a bug 3 years ago expecting it to fallthrough like C and it has been causing my new built in acme client to fail to renew.