Skip to content

Experimental package that makes it possible to create controllers (MVC) with structs.

License

Notifications You must be signed in to change notification settings

jlucasnsilva/bindroutes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Bindroutes is an experimental package to allow you to write controllers as structs as such:

Controller struct {
    bindroutes.BasePath `handle:"/users"`

    NewUser http.HandlerFunc `handle:"POST /"      using-router:"public"`
    GetUser http.HandlerFunc `handle:"GET /{id}"   using-router:"private"`
}

This package doesn't provide the routing capabilities, for that you will need another like 'chi' or 'http.HandleFunc'.

About

Experimental package that makes it possible to create controllers (MVC) with structs.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages