404 page not found


I am trying to make a signup page. I dont know whats the error in my code, whenever i run my localhost it shows 404 .

Here is my code->https://github.com/vashish1/test

Any help would be appreciated.

1 Like

I think you hace to change the code where assign this particular route:

r := mux.NewRouter()
r.HandleFunc("/", handlers.HomeHandler)
r.HandleFunc("/signup", handlers.SignUpHandler(&env)).Methods("GET", "POST")
http.Handle("/", r)
1 Like

I made those changes, but it is showing the following error.

cannot use handlers.SignUpHandler(&env) (value of type http.Handler) as func(http.ResponseWriter, *http.Request) value in argument to r.HandleFunc

1 Like

Look over signup page from this project, seems to be what you looking for.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.