Live data from Hacker News

Show HN: Create a full language server in Go with 3.17 spec support

github.com

21–24 of 24 posts

Re: Show HN: Create a full language server in Go with 3.17 spec support

#21
post #13
post #9

Earlier quoted context omitted.

Yeah some times godoc comments look crap by necessity

But you don't have to add a docstring. Cases like this are worse than no docstring at all, because it wastes the reader's time. If you add one, at least make the effort to provide some useful information. For example which is more severe: higher or lower numbers.

Every public item should have a docstring, even if it's just to indicate that there's nothing special about the item.

Re: Show HN: Create a full language server in Go with 3.17 spec support

#22
I really like the interface-based auto-registration pattern, so elegeant!

The implementation of HoverHandler seems clever... no manual wiring. That's the kind of API design that makes Go's implicit interfaces shine.

I'm curious: How does error recovery work when a handler panics? Does the server keep the connection alive, or does it tear down?

Re: Show HN: Create a full language server in Go with 3.17 spec support

#23
post #22

I really like the interface-based auto-registration pattern, so elegeant! The implementation of HoverHandler seems clever... no manual wiring. That's the kind of API design that makes Go's implicit interfaces shine. I'm curious: How does error recovery work when a handler panics? Does the server keep the connection alive, or does it tear down?

Thanks -

If its a straight error, then the error response is returned and we're all happy!

If the handler panics, the server crashes, so that's something I'm off to fix now!

Thanks!!!!

Post reply on HN