A web framework designed for NET friendly developers. Code base designed by following .NET 6
minimal api structure.
GoNET framework is using following packages to provide the ultimate flavour
- uber-go/dig dependency injection tool for golang
- go-chi/chi lightweight http service building tool for golang
Install package in your project
go get github.com/rafiulgits/gotnet
Check examples
Simple http server
func helloHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write([]byte(`{"response" : "ok"}`))
}
func main() {
builder := gotnet.NewAppBuilder()
app := builder.Build()
app.MapHandlerFunc("/", helloHandler)
app.Run(nil)
}