Hi everyone, I just got started with GO and decided to attempt building an HTTP API package using Gorilla Mux for an existing backend. Unfortunately i have gotten stuck on an issue with initializing my routes for the past couple of days. I tried searching for a solution online and have read a ton of articles/tutorials but have not found exactly what i am trying to do.
The code is a little big to just paste and since it uses an external import which play.golang does not support i attached it. My code does not compile returning: ./main.go:40: cannot use (*Api).ListHandler (type func(*Api, http. ResponseWriter, *http.Request)) as type http.HandlerFunc in field value Now i sort of understand why it says this because my ListHandler does not adhere to the http.HandlerFunc signature as it is part of my Api struct but this is where i am stuck. Any ideas on how to make this work or should i be doing something completely different. (There could be some pointer errors here and there, i am still struggling with those so try to overlook them :P and i mocked the backend struct as it is in my opinion not relevant to the issue) - Dave -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
main.go
Description: Binary data