Using github.com/gorilla/mux
I do this:
router := mux.NewRouter().StrictSlash(true)
router.HandleFunc("/qa/{cat}",qaall)
router.HandleFunc("/qadetail/{id}",GetQuestionAnswerDetail)
Above file is working because we pass the {}
but when we pass this on
router.HandleFunc("/AddQuestion",AddQuestion)
It gives me the following error:
http: panic serving 127.0.0.1:57748: ObjectIDs must be exactly 12 bytes long (got 0)