4 ms·
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 differ
by JodieBenitez 3y ago
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 ?
- ilyt 3y agoHaven't seen in the wild. It's just bad way to do it.
- EspressoGPT 3y agoMost likely not because there's no reason to do it this way other than backwards compatibility ...
- tgv 3y agoI 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.