Hacker News new | past | comments | ask | show | jobs | submit login

Go is not my main tool but I've used Gin which goes like this:

    router.GET("/", func(context *gin.Context) {
        ...
    }
And it seems to be no different than many other languages/frameworks. Are there more examples that use the "GET /path/" way ?



Most likely not because there's no reason to do it this way other than backwards compatibility ...


I haven't read the article, but I would guess it's because the http header literally starts like that. You could match that against the first line, instead of having to break it into components.

It does sound like a micro-optimization.


Haven't seen in the wild. It's just bad way to do it.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: