saintpete / logrole

Logrole for Twilio - Create User Roles for Limited Access to Twilio Logs
Other
27 stars 10 forks source link

Compilation failure on Windows #21

Closed kevinburke closed 7 years ago

kevinburke commented 7 years ago

After running “go get -u github.com/saintpete/logrole/…”

I see:

# github.com/saintpete/logrole/server
C:\SRC\Go\src\github.com\saintpete\logrole\server\errors.go:113: cannot use e.Serve401 (type func(http.ResponseWriter, *http.Request)) as type http.Handler in argument to rest.RegisterHandler:
        func(http.ResponseWriter, *http.Request) does not implement http.Handler (missing ServeHTTP method)
C:\SRC\Go\src\github.com\saintpete\logrole\server\errors.go:114: cannot use e.Serve403 (type func(http.ResponseWriter, *http.Request)) as type http.Handler in argument to rest.RegisterHandler:
        func(http.ResponseWriter, *http.Request) does not implement http.Handler (missing ServeHTTP method)
C:\SRC\Go\src\github.com\saintpete\logrole\server\errors.go:115: cannot use e.Serve404 (type func(http.ResponseWriter, *http.Request)) as type http.Handler in argument to rest.RegisterHandler:
        func(http.ResponseWriter, *http.Request) does not implement http.Handler (missing ServeHTTP method)
C:\SRC\Go\src\github.com\saintpete\logrole\server\errors.go:116: cannot use e.Serve405 (type func(http.ResponseWriter, *http.Request)) as type http.Handler in argument to rest.RegisterHandler:
        func(http.ResponseWriter, *http.Request) does not implement http.Handler (missing ServeHTTP method)
C:\SRC\Go\src\github.com\saintpete\logrole\server\errors.go:117: cannot use e.Serve500 (type func(http.ResponseWriter, *http.Request)) as type http.Handler in argument to rest.RegisterHandler:
        func(http.ResponseWriter, *http.Request) does not implement http.Handler (missing ServeHTTP method)

Investigating...

kevinburke commented 7 years ago

Go version:

go version go1.7.5 windows/amd64
kolencherry commented 7 years ago

I've replicated this on OS X (10.11) with go1.7.5 darwin/amd64

kevinburke commented 7 years ago

OK, I can reproduce this as well. It looks like the kevinburke/rest dependency changed... Will have a fix ready shortly

kevinburke commented 7 years ago

@kolencherry - in the future you might want to run "make deps", it's the "npm install" equivalent and will check out compatible versions of every dependency to your vendor directory.

It should solve the problem above as well.

Nevertheless, I'm going to try to make sure that the project works with the latest versions of every dependency as well.