Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined: http:MethodOptions #47

Closed
tychay opened this issue Feb 7, 2018 · 2 comments
Closed

undefined: http:MethodOptions #47

tychay opened this issue Feb 7, 2018 · 2 comments

Comments

@tychay
Copy link

tychay commented Feb 7, 2018

In the last month (probably with the most recent commits):

$ go get github.com/rs/cors
# github.com/rs/cors
/opt/go/src/github.com/rs/cors/cors.go:185: undefined: http.MethodOptions
/opt/go/src/github.com/rs/cors/cors.go:207: undefined: http.MethodOptions
/opt/go/src/github.com/rs/cors/cors.go:218: undefined: http.MethodOptions
/opt/go/src/github.com/rs/cors/cors.go:242: undefined: http.MethodOptions
/opt/go/src/github.com/rs/cors/cors.go:300: undefined: http.MethodOptions
/opt/go/src/github.com/rs/cors/cors.go:376: undefined: http.MethodOptions

It looks that it now requires go 1.6?

$ go version
go version go1.5 linux/amd64
@rs
Copy link
Owner

rs commented Feb 8, 2018

I'm only testing back to go 1.8. I guess those constants were introduced in later versions.

@tychay
Copy link
Author

tychay commented Feb 8, 2018

I think it was introduced in go 1.6 (don't know go does a poor job of documenting earlier versions). In any case, this happened on my vagrant/chef instance which was using the default supermarket install (go version 1.5). I've since changed it to the version I'm using in production.

Might want to document this somewhere in the readme. In any case, I'm closing this issue.

@tychay tychay closed this as completed Feb 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants