This is Endpoint versioning (i.e /v1/path
) example using custom middleware group in gin-gonic.
-
Run
go run main.go
-
Test APIs On
https://localhost:8080
.
- For list users in v1, path should be
https://localhost:8080/v1/users
. Likewise, all other routes are working.