func (helloController *HelloController) Register(server server.Server) { fmt.Println("Registering HelloController") server.HandleFunc("/", handleHello).Methods("GET") }
func (helloDep *HelloDep) Register(server server.Server) { fmt.Println("Registering HelloDepController") server.HandleFunc("/hellodep", handleHelloDep).Methods("GET") }
// Register registers this plugin in the server func (t *Todos) Register(server server.Server) { server.HandleFunc("/todos", handleGet).Methods("GET") server.HandleFunc("/todos", handlePOST).Methods("POST") server.HandleFunc("/todos/{id}", handlePOST).Methods("PATCH") server.HandleFunc("/todos/{id}", handleDELETE).Methods("DELETE") }