Thanks to everyone who reassured me.
I considered posting a set of links from the most popular Golang tutorials
that do not return after calling http.Error(), but then baulked

In any case, thanks once again to all in this thread.

Regards


On Wed, Jul 5, 2023 at 4:13 AM ben...@gmail.com <benh...@gmail.com> wrote:

>
> > Every example of http Handler that I have seen so far looks like this:
>
>
> Yes, that's definitely odd. I just grepped my Go source directory (which
> includes the Go compiler and stdlib and a bunch of other Go code), and
> almost all of them have a "return" on the next line. For example:
>
> $ rg --type=go --sort=path 'http\.Error\(' -A1
> ...
> pkgsite/internal/worker/server.go
> 319: http.Error(w, http.StatusText(code), code)
> 320- return
>
> -Ben
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/7a727dd2-e39a-4414-b323-6f3ff2a27aa7n%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/7a727dd2-e39a-4414-b323-6f3ff2a27aa7n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA_NO6i1XZN%2BpkGjEfeXubtZ_-xWzaaBDxQuo0GfaqdjH945EA%40mail.gmail.com.

Reply via email to