News for hackers. Stuff that matters.
Re:How I write HTTP services in Go after 13 years by matt_callmann on Friday February 09, 2024 @03:33PM (#39320138)
is there a git repo with example code?
Re:How I write HTTP services in Go after 13 years by mtlynch on Friday February 09, 2024 @03:40PM (#39320226)
Not OP, but I design my Go projects with a very similar pattern that I learned from OP's 2018 post.

I think this is a pretty good example of a real-world implementation:

https://github.com/mtlynch/picoshare

Particularly these files:

https://github.com/mtlynch/picoshare/blob/2cd9979dab084ca781...

https://github.com/mtlynch/picoshare/blob/2cd9979dab084ca781...

Re:How I write HTTP services in Go after 13 years by karolist on Friday February 09, 2024 @05:11PM (#39321113)
out of curiosity, why no sort-of-established pkg and internal dirs? What do you think of https://github.com/photoprism/photoprism structure?
Re:How I write HTTP services in Go after 13 years by mtlynch on Friday February 09, 2024 @05:22PM (#39321218)
I'm not familiar with that package structure, unfortunately. It might be good, but I'm not sure what the reasons are for structuring the project that way.