Federated blogging with WriteFreely
Federated blogging with WriteFreely
Posted Mar 16, 2019 10:32 UTC (Sat) by ms (subscriber, #41272)Parent article: Federated blogging with WriteFreely
They're using the built-in Go webserver which as far as I know has an excellent security record - I would have no worries about exposing it directly to the internet; I have used it a lot commercially/professionally.
The template language *is* documented. It's the standard Go templating system. https://golang.org/pkg/text/template/ https://golang.org/pkg/html/template/
That said, I agree about documenting which resources/methods/vars are available to the templates. The template entry point is Execute or ExecuteTemplate, and the last arg to that is always the "receiver" for the template, but eg https://github.com/writeas/writefreely/blob/cb1bd37f64abc... is unhelpful given it comes in as the empty interface. Generally I consider use of the empty interface in Go as a code smell... https://github.com/writeas/writefreely/blob/32e99d00415c6... is somewhat more discoverable. OTOH, depends on the intended audience - I've been working professionally in Go for over 5 years now so I have no qualms digging through this.
Just FTR, I've no association with WriteFreely and have never heard of it or looked at the code base before this morning.
Posted Mar 16, 2019 13:56 UTC (Sat)
by corbet (editor, #1)
[Link] (3 responses)
Posted Mar 16, 2019 14:12 UTC (Sat)
by ms (subscriber, #41272)
[Link] (2 responses)
https://github.com/writeas/writefreely/blob/master/go.mod
There's been an awful lot of thinking that has gone into this mechanism, and whilst it's not quite finished in Go 1.12, it's pretty close these days. There's a lot of writing about it all at https://research.swtch.com/vgo
Posted Mar 16, 2019 14:23 UTC (Sat)
by corbet (editor, #1)
[Link] (1 responses)
Posted Mar 16, 2019 14:25 UTC (Sat)
by ms (subscriber, #41272)
[Link]
From my reading, it's using a bunch of "go get" commands, with no version pinning in sight anywhere. Are those version strings hidden somewhere that I'm unaware of?
Downloading packages
Downloading packages
https://github.com/writeas/writefreely/blob/master/go.sum
OK, clearly I'm pretty ignorant about how Go packaging works, and it's not as bad as I had feared. Thanks for enlightening me.
Downloading packages
Downloading packages
