Some simple router examples and practical examples with the gin framework and the go programming language.
this router send you a json data. To see routers html
- router.GET("/posts")
- router.GET("/posts/:name")
-
first install
go
programming language from this url. -
go to project directory and write in
terminal
:go run main.go
-
go to your browser and open this url: http://localhost:8080/
you can see urls in top